Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
UTC time conversion
Hello all,

To help with the new Google Calendar functions, we require a simple way to convert HH:MM:SS to the UTC format: t012345z. To do this, we need an addition to the Formula library called:

ToUniversalTime Method ()

as noted here:
https://msdn.microsoft.com/en-us/library/system.datetime.touniversaltime(v=vs.110).aspx

At the moment, all methods explored are throwing back a BAD response in the workflow action
ID
1118
Category
Setup
Author

basenine
Date Created
7/2/2017 10:22:20 PM
Date Updated
7/12/2017 9:25:45 AM
Status
New Idea
Score
10
Promoted By
basenine
Comments
basenine 7/2/2017 11:15:35 PM
Ignore previous post...figured out a way:

Format([GoogleInstall Start Time],"s")&"z"

Where [GoogleInstall Start Time] is a ToTimestamp([Start Date], [Install Start Time])

The "s" reformats to "yyyy'-'MM'-'dd'T'HH':'mm':'ss"
The "z" does the Timezone lookup...having said that, probably need to use "zzz" to allow for 'HH':'mm' offset rather than just 'H'
basenine 7/4/2017 5:42:16 PM
UPDATE:

After a struggle with TimeZone anomalies, and a support request...it was determined that Format() is unnecessary when stringing a Date and Time together...

i.e. when [GoogleInstall Start Time] = ToTimestamp([Start Date], [Install Start Time]), you can drop the
<%=Format([GoogleInstall Start Time],"s")&"z"%>
and simply have
<%=[GoogleInstall Start Time]%>

martin oliver 7/11/2017 9:40:37 AM
@basenine - Thanks for sharing this
Kirill Bondar  Staff  7/12/2017 9:25:45 AM
Format() function is intended to build user-friendly string from the value - it is locale-aware and, in case of timestamps, converts the value to user's timezone.

XML and JSON have strict, locale-invariant value formatting rules and using <%= value-expression %> typically produce proper results.


Feedback
 
Back to Search Results