Solved

How do I get DateTime for my TimeZone?

  • 10 September 2020
  • 1 reply
  • 260 views

I am looking to query a SharePoint List and get all items that were created today. Once it gets into the evening, the UTC for "Current Date and Time" gets into the next day. (i.e. when I run it at 09-09-2020 9:50pm EST, Current Date time returns 2020-09-10T01:50:46Z).

 

I know I can convert that to a string and convert to my timezone, but then how do I convert that back to a DateTime object? The query requires a DateTime since the SP field is a DateTime

icon

Best answer by Gavin-Adams 10 September 2020, 06:00

View original

1 reply

Userlevel 4
Badge +12

I would work with the date fields both for query and what is returned from SharePoint in UTC (zulu timezone).


Then when you need to present a date to a user eg in an email you can use the Format Date to String action to convert the GMT date into a local timezone and with a nicer display format and store in a string variable.


You can then add that string variable into the email notification body, etc.


 


https://help.nintex.com/en-US/nwc/Content/Designer/Actions/FormatDatetoString.htm

Reply