Print      Open PDF Version of Online Help


Previous Topic

Next Topic

UtcConvert

The UtcConvert function in Expression Builder converts the specified date and time from the current user's time zone setting, and returns the date and time in the specified time zone.

Syntax

UtcConvert(utc_date_time, time_zone)

Result Type

Time

Arguments

The following table describes the arguments for the function.

Argument

Description

utc_date_time

The date and time according to the current user's time zone setting in the format: MM/DD/YYYY HH24:MI:SS

time_zone

The name of a time zone

Examples

If the current user's time zone setting is (GMT-05:00) Eastern Time (US & Canada), the following example:

UtcConvert('12/14/2007 17:07:05', 'Pacific Standard Time')

returns the following value:

12/14/2007 12:07:05

If the current user's time zone setting is (GMT+05:30) Calcutta, Chennai, Mumbai, New Delhi, the following example:

UtcConvert('12/14/2007 15:07:05', 'Eastern Standard Time')

returns the following value:

12/14/2007 04:37:05

The following examples show how to get the corresponding UTC time for Western European Time:

UtcConvert(Timestamp(),"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna")

UtcConvert(Timestamp(),"W. Europe Daylight Time")

UtcConvert(Timestamp(),"W. Europe Standard Time")

The following examples show how to get the corresponding UTC time for South African Time:

UtcConvert(Timestamp(),"(GMT+02:00) Harare, Pretoria")

UtcConvert(Timestamp(),"South Africa Daylight Time")

UtcConvert(Timestamp(),"South Africa Standard Time")

If the name of a time zone contains a special character, such as a single quotation mark (') or a comma (,), you must enclose the name of the time zone, or the special character, in double quotation marks. For example:

%%%UtcConvert('08/03/2009 12:01:33',"(GMT+13:00) Nuku" + "'" + "alofa")%%%

%%%UtcConvert('08/03/2009 12:01:33', "(GMT+13:00) Nuku'alofa")%%%

Related Topics

See the following topics for related Expression Builder information:


Published 1/9/2017 Copyright © 2005, 2017, Oracle. All rights reserved. Legal Notices.