Context: I've been tasked to start migrating our workflows over to O365 from 2013 ahead of time to hopefully make the transition smooth. Our environment is based in NZ with a timezone of (UTC +12).
I'm having two issues with dates within scheduled workflows and hope they might be caused by the same thing:
- Our preferred date format is dd/MM/yyyy and logging the variable that contains the date returns it like this. However, when a notification is sent out it gets converted to MM/dd/yyyy and takes off 1 day. E.g. 20/06/2019 becomes 06/19/2019. The notification action comes right after the log action in WF so I wouldn't expect it to be changing.
- Using query list to filter out items if due date has passed current date is causing workflows to terminate with the following message: "String was not recognized as a valid DateTime".
Due date is a sharepoint column as a Date and time
Current date is done by using Add time to date action storing result in a Date/Time variable:
Regional settings in the site are configured to our local time (NZ UTC+12) and have quadruple checked it at this point - I've tried changing to US to see if this solves it but both issues still occur. Also these issues only occur in scheduled workflows.
If anyone has any idea on how to solve either of the above issues I would love to hear them.
Best answer by tomsView original