formatTimeOnly

Reformats a date/time to the default time format and strips out the date.

Type and Usage

Parameters

The only parameter is a string or variable that specifies a date/time.

Output

  • Returns a time only in the format used by dateCurrent (for example, 1:15 PM).

  • Returns null if the parameter cannot be evaluated.

Example

Returns the current time only:

<$formatTimeOnly(dateCurrent())$>

Formats the time only and displays as 5:00 PM:

<$formatTimeOnly("2/2/99 5:00 PM")$>

Formats the time only and displays as 6:14 PM:

<$formatTimeOnly("04/21/2001 18:14:00")$>