FormatDateTime
Mon 01 January 2018Syntax
FormatDateTime(datetime, {timezone | "Local" | "Base"}, displayTZ)
Description
Use the FormatDateTime function to take a datetime value and convert it to text. If a specific time zone abbreviation, or a field reference, is passed in timezone , FormatDateTime adjusts the DateTime to the userâs local time zone instead of the specified time zone. The systemâs base time zone is specified on the PSOPTIONS table. The value datetime is assumed to be in base time.
See .
If Local is specified for time zone, FormatDateTime adjusts the DateTime to the userâs local time zone instead of a specific time zone.
If True is specified for displayTZ , FormatDateTime appends the time zone abbreviation to the returned string.
Parameters
Field or Control |
Definition |
---|---|
datetime |
Specify the DateTime value to be formatted. |
timezone | Local | Base |
Specify a value for converting datetime . The values are:
|
displayTZ |
Specify whether the time zone abbreviation should be appended to the returned string. This parameter takes a Boolean: True if the abbreviation should be appended, False, otherwise. |
Returns
A formatted string value.