ConvertDate()
Syntax
Date.q = ConvertDate(Date.q, Format)Description
Converts a date between local time and UTC time.
Parameters
Date.q The date to convert. Format The new date format. It can be one of the following constants: #PB_Date_LocalTime: Will convert an UTC date into local time date. #PB_Date_UTC : Will convert a local time date into an UTC date.
Return value
Returns converted date, or -1 if the conversion failed.
Example
Debug FormatDate("Local time: %hh:%ii:%ss", ConvertDate(DateUTC(), #PB_Date_LocalTime)) Debug FormatDate(" UTC time: %hh:%ii:%ss", ConvertDate(Date(), #PB_Date_UTC))
See Also
FormatDate(), Date(), DateUTC()
Supported OS
All