TimestampToString

STD.Date.TimestampToString (timestamp, format)

timestampAn INTEGER8 holding the number of microseconds since epoch (January 1, 1970 UTC)
formatOPTIONAL. The format of the string to return. See strftime documentation for details (http://strftime.org/). If omitted, it defaults to '%Y-%m-%dT%H:%M:%S.%@' which is YYYY-MM-DDTHH:MM:SS.ssssss.
Return:The converted timestamp as a string in the specified format.

The TimestampToString function converts a Timestamp_t value containing the number of microseconds since epoch (January 1, 1970 UTC) into a human-readable string using a format template of strftime standards. Two additional format specifiers are available to show fractional seconds:

%@Fraction of seconds in microseconds (6 digits)
%#Fraction of seconds in milliseconds (3 digits)

Millisecond fractions are truncated from microseconds when necessary.

The maximum length of the resulting string is 255 characters.

Example:

IMPORT STD; 
STD.Date.TimestampToString(1048998120000000, '%A %B %d, %Y T%H:%M:%S.%#'); 
                                // returns Sunday March 30, 2003 T04:22:00.000