Easy to Create, Easy to Change - Easy to use!

Function::DateTime

TimeAmPm



Parameters


Returns/Result


Examples


Reference

timeampm

Type

Time Function

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

timeampm( TIME VALUE)

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

timeampm( 13: 53: 12)

Returns: 01: 53: 12 PM

 

timeampm( 11: 10: 30)

Returns: 11: 10: 30 AM

 

timeampm( DEPARTURE TIME)

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.

See Also


On the forum about TimeAmPm

On the blog about TimeAmPm