ToUTC

The ToUTC() function converts a local date with the given timezone (TZ database name) to a UTC date. You can find the time zones used in wem in the list of IANA Standard Time zones.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a UTC date.

Returns null if the time zone argument is not recognized

Syntax

ToUTC(date, timezone)

ToUTC(date(2020,8,16,15,37), "Europe/Amsterdam") =>Result: 16 August 2020 13:37

ToUTC(date(2020,8,16,15,37), "Australia/Melbourne") =>Result: 16 August 2020 05:37

ToUTC(unknowntdate, unknowntimezone) =>Result: unknowndate

Parameters

NameTypeRequiredDescription

date

date time

a date value

timezone

text

Full timezone name. You can find the different names in the portal settings.

Last updated