FormatDateTime Function
Syntax: FormatDateTime(['format'],[§X])
If the Format parameter is not specified, a default format will be used.
If the §X parameter is not specified, the current date time will be used, else the §X will represent the Date field or the Time field or the Timestamp field of the query feeding the report.
The format can be for example:
'mmmm, dddd d, yyyy' for April, Wednesday 9, 2003
'mmm, ddd dd, yyyy' for Apr, Wed 09, 2003
'mm/dd/yyyy' for 04/09/2003
'mmmm, dddd d, yyyy hh:mm AM/PM' for April, Wednesday 9, 2003 11:25 AM
'hh:mm AM/PM' for 03:15 PM
The format can be aslo a short name used by Windows for the date or time fields:
Examples:
FormatDateTime('Date, long',§X)
FormatDateTime('Date, reduce',§X)
FormatDateTime('Date, short',§X)
FormatDateTime('Time, long',§X)
FormatDateTime('Time, reduce',§X)
FormatDateTime('Time, short',§X)
Warning: the format must always be typed between single quotes without any space between the quote and the specified format.
Example of application:
'Printed on '+FormatDateTime('Date, long')+' at '+FormatDateTime('Time, short')