Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

taking time off an existing date time - that changes the date

Kearnd967
7 - Meteor

Good afternoon.

 

I have a problem converting a date time into a different time zone.

 

My input is correctly formatted as a date/time yyyy-MM-dd HH:mm:ss

 

I use the formula 

 

if [Time Zone] = "DST" then DateTimeAdd([Off Merge],-60,"Minutes") else [Off Merge] endif

 

This effectively takes 60 minutes off each of the times where the Time Zone is listed as DST.

 

However, if the time is less than 01:00:00, the formula fails and nothing is changed.  I would want the time and date to change, for example:

 

2023-10-30 00:30:00 should become 2023-10-29 23:30:00

 

Any ideas why this would not be happening?

 

Many thanks in advance.

 

David.

 

 

1 REPLY 1
binuacs
21 - Polaris

@Kearnd967 I can see the change in time

image.png

Labels