Silly Flow Designer Time/Date problem?

Zack9
Tera Expert

Is there a simple way to output a time/date field to a message in Flow Designer?

 

Ok, so I've wasted too much time on this probably easy problem. I'm using flow designer to send a custom Teams message formatted in HTML. I am sending a string to include the planned start date field from change request records. 

 

The problem is, when I use pill picker to set a variable to the planned start date field, the runtime value looks good. Screenshot below. However, when I call the variable later in the html message or assign it to a different variable it shows a time 4 hours later. 

 

4 hours happens to be the difference in time zones from UTC to New_York, my time zone. However, when I try to convert the variable to New_York assuming it is showing Universal time, I get a time 4 hours less than America/New_York. I don't get it. 

 

Any tips would be appreciated. 

 

Zack9_0-1696356507834.png

 

2 REPLIES 2

Uncle Rob
Kilo Patron

Can you show us how that Flow Variable is getting set?

I don’t need two variables but have overcomplicated this through trying to workout the problem with different variable assignments. All I need is to dump the date as we read it from the change form "Planned Start Date" into a Teams HTML message. It appears that something manipulates my variable when it's put into the html message. 

 

I have tried several ways to assign the first variable where the runtime value appears to be what I want. Both of the values returned by the below pill picker appear to be strings in the test results, but the time gets manipulated by something later when put in a Teams html message. 

Zack9_0-1696426528616.png

 

In this next one I use the “available transform” to convert date to String. Again, this appears to work at this first variable stage as it has the runtime value I want, the expected date and time.

Zack9_1-1696426528623.png

 

I attempt to assign a second variable the value of the above variable. I have tried that multiple ways including the ones above using the pill picker to select the flow variable.

Zack9_2-1696426528624.png

 

Also, this. Again, the runtime value looks good.

Zack9_3-1696426528626.png

 

Runtime value of the above is 2023-08-15 19:00 as seen below, but output to the message appears as 2023-08-15 23:00:00.

Zack9_4-1696426528628.png

 

The following is from my string variable to output to the Teams message. The time has now been modified – but shouldn’t it be string field? How did 4 hours get added to it?

Zack9_5-1696426528629.png

 

Zack9_6-1696426528629.png

 

This value is what ends up in my Teams message. 4 hours greater than what I expect there. Again, the variable runtime value in test shows as 2023-08-15 19:00:00. 

Zack9_7-1696426528629.png

 

OK, so workaround time! At the first variable assignment let me run a “string to date” transform function so that I know I am working with a date.

 

Then at the second variable, I will use the date and time - subtract time transform function to subtract 4 hours. Hopefully, this gets me what I need and can move on. But it doesn’t!

Now I get 2023-08-15 12:00:00 instead of the 2023-08-15 19:00:00 that I want and expect. Something strange is happening here.

Zack9_8-1696426528631.png