Home Search

DriveWorks Pro 24
ConvertFromUtc

Send Feedback

ConvertFromUtc

Converts the provided DateTime from UTC using the provided Time Zone Identifier.

Syntax

ConvertFromUtc(Date, Time Zone ID)

Where:

Date is the date to convert.

Time Zone ID is the time zone identifier to convert the DateTime to.

This is the IANA Zone ID of the time zone (see Noda Time | Time Zones).

Examples

Example 1

ConvertFromUtc(Now(),"America/Chicago")

Will result in 09/25/2026 04:30:00 (UTC -5) when called on September 25 2026 at 09:30 (UTC)

Example 2

To obtain the Time Zone ID from a selected row of time zones in a Data Table control.

ConvertFromUtc(Now(),TableGetValue(GetTimeZones(),1,TimeZoneTableReturn))

Will result in 09/25/2026 04:30:00 (UTC -5) when called on September 25 2026 at 09:30 (UTC)

Example 2 Data Table

Example data from the GetTimeZones() function, and presented in a Data Table control named TimeZoneTable.

The selected row from the TimeZoneTable control results in the value America/Chicago (column 1) being returned to the TableGetValue function.

IDDisplay NameOffset
America/CancunEastern Standard Time (Mexico)-05:00
America/ChicagoCentral Standard Time-05:00
America/Indiana/KnoxCentral Standard Time-05:00
America/WinnipegCentral Standard Time-05:00
Canada/CentralCentral Standard Time-05:00
US/CentralCentral Standard Time-05:00

See Also

ConvertToUtc

GetTimeZones