
Purpose
The timeampm function converts a time value from a 24-hour format to a 12-hour format and appends the appropriate AM or PM designation.
Syntax
Returns
A text value representing the 12-hour clock time with a suffix of either AM or PM. Converts time values from midnight (00:00:00) to (11:59:59) to AM. Converts time values from noon (12:00:00) to (23:59:59) to PM.
Examples
Returns: 01: 53: 12 PM
Returns: 11: 10: 30 AM
Returns the value in the DEPARTURE TIME field in the 12-hour clock format and adds the correct suffix for every record that is processed. If a record contains the value 19:30:25 in the DEPARTURE TIME field, the function returns 07:30:25 PM.