Simplicty and flexibility!


Function::DateTime

AmPm
ampm(TimeField)
ampm(08:15:22)


The ampm functione valuates avalue expressed in the 24-hour time format (HH:MM:SS) and returns the appropriate abbreviation AM (before noon), or PM (after noon).

Parameters


Time Value either as a Time Field or expressed in the 24 hour format hh:mm:ss

Returns/Result


A fixed string AM or PM.

Examples


Example 1


ampm(16:12:33)

Result: PM

Example 2


ampm(01:22:43)


Result: AM


Reference

ampm

Type

Time Function

Purpose

The ampmfunctionevaluates avalueexpressed in the 24-hour time format (HH:MM:SS) and returns the appropriate abbreviation AM (before noon), or PM (after noon).

Syntax

ampm(TIME VALUE)

Returns:

A textvalue(either AM or PM).

Usage:

Timevaluesfrom midnight (00:00:00) to (11:59:59) return AM. Timevaluesfrom noon (12:00:00) to (23:59:59) return PM.

Examples:

 ampm(08:15:25)

Returns:AM

 ampm(15:30:50)

Returns:PM


See Also


TimeAmPm

On the forum about AmPm

On the blog about AmPm


dg3_HelpView