Is there anyway to convert a UTC value from variable Flow.StartDateTimeUtc to a standard local time.
CRM is able to do it if the value is passed into a date field but this conversion needs to occur before going to CRM as the value will populate a string field
Date example: 2018-01-18T22:13:52.691Z
Converted local time: 19/01/2018 8:43AM
The UTC time offset can be stored in a variable at the beginning of the flow and be added to the StartDateTimeUtc. There are functions in Architect for calculations involving DateTime objects. Alternatively the time offset can be passed in from the CRM. This allows for more flexibility but (potentially) entails an additional REST call.
@anon28066628 is correct. As an example, in a call flow you could set up a starting task with an Update Data action. On that Update Data action you'd add a DateTime assignment to a Flow.StartDateTimeLocal variable and assign it a value like this using an expression:
AddHours(Flow.StartDateTimeUtc, -5)
where -5 is the hour offset you wish to use from UTC. Architect also has an AddMinutes function where you could deal with a timezone whose UTC offset was 3 hours, 30 minutes like so:
AddMinutes(Flow.StartDateTimeUtc, 210) where 210 = 3 * 60 + 30
Then at the end of the starting task add a Jump to Menu action and go the flow's main menu.
Now you'll have a Flow.StartDateTimeLocal value that will be offset from UTC accordingly that you can use in the flow.
Oh, one other thing is that we do have this help article:
that describes other ways to deal with this. When it comes to Example 3 on that page, you'd probably want to look at using GetDayOfWeekOccurrence functions to perform that logic.
When it comes to the value you'd want to use for the offset in the AddHours / AddMinutes calculation, it doesn't have to be hard coded. You could create a Data Action that returns the offset to use.
Thanks for your responses; I've had a play around with this and can now change the UTC time to the correct local time however the date format is incorrect.
The Current date Format is MM/DD/YYYY Time
I need to convert the date format to DD/MM/YYYY Time