Format function example

This example shows various uses of the Format function to format values by using both named and user-defined formats. For the date separator (/), time separator (:), and AM/ PM literal, the actual formatted output displayed by your system depends on the locale settings on which the code is running. When displayed in a field, the short time and short date formats of the system locale are used, which may differ from the code locale. For these examples, English/United States is assumed.

Function Returns
Format([Received], "h:m:s") 17:4:23
Format([Received], "Long Time") 17:4:23 PM
Format([Received], "Long Date") Monday, January 27, 1997
Format([Received], "hh:mm:ss AMPM") 05:04:23 PM
Format([Received], "dddd, mmm d yyyy") Monday, Jan 27 1997

Function Returns
Format(23) 23
Format(5459.4, "##,##0.00") 5,459.40
Format(334.9, "###0.00") 334.90
Format(5, "0.00%") 500.00%
Format("HELLO", "<") hello
Format("This is it", ">") THIS IS IT