Silly Flow Designer Time/Date problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 11:08 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 05:01 PM
Can you show us how that Flow Variable is getting set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 06:43 AM
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.
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.
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.
Also, this. Again, the runtime value looks good.
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.
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?
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.
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.