Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
WebSpeed API Reference : convert-datetime
 

convert-datetime

This function converts date and time between local and UTC (GMT) dates and times. Its return value is the utc-offset global variable.

Location

web\method\cgiutils.i

Parameters

INPUT p_conversion AS CHARACTER
The type of conversion to perform. The valid values are:
*"UTC" — Converts date and time from local to UTC time.
*"LOCAL" — Converts date and time from UTC to local time.
*"NORMALIZE" — Normalize date and time so the value of time is legal between zero and the number of seconds per day.
INPUT p_idate AS DATE
The date to convert. Uses the DATE data type.
INPUT p_itime AS INTEGER
The time to convert, expressed as seconds since midnight.
OUTPUT p_odate AS DATE
The converted date.
OUTPUT p_otime AS INTEGER
The converted time.

Returns

CHARACTER

Notes

The conversions between local and UTC time are also normalized so that the value of time is between zero and the number of seconds per day.

Examples

See the format-datetime function in web\method\cgiutils.i.