For more information, see the second example in this topic.
strLib.formatTimestamp( aTimeStamp TIMESTAMP(yyyyMMddHHmmssSSSSSS)? in [, timestampFormat STRING? in ]) returns (result STRING?)
This example provides a complex format pattern:
myTs TIMESTAMP = "20060606123200"; myFormat STRING = "MMMMMMMMM dd, yyyy ' at ' hh:mm aa"; result STRING; result = strLib.formatTimestamp(myTs,myFormat); // result is "June 6, 2006 at 12:32 pm"
In the next example, EGL uses masks from the variables to create the strings:
ts1 timestamp( "yyyyMMddHHmmssffffff" ); ts2 timestamp( "yyyyMMdd" ); ts3 timestamp( "MMddHHmmssff" ); tsString STRING; defaultTimestampFormat = ""; // uses pattern yyyy-MM-dd HH:mm:ss.SSSSSS tsString = formatTimestamp( ts1 ); // uses pattern yyyy-MM-dd tsString = formatTimestamp( ts2 ); // uses pattern MM-dd HH:mm:ss.SS tsString = formatTimestamp( ts3 );