Custom Command
CodeReferences

Understanding Time Formats

Outdated

This page is outdated and will no longer be updated. Please use this one instead.

Many functions require you to specify a time format to correctly construct date and time values. This guide explains the accepted time format macros you can use.

For example, the $timeToDate function uses these formats.

Available Time Format Macros

The following table details the available time format macros and their descriptions:

MacroDescriptionExample
dDay number of the month9
0dDay number of the month with leading zero09
dnDay name of the weekSunday
yYear number2022
hrHour in 24-hour format20 (8 PM)
0hrHour in 24-hour format with leading zero05 (5 AM)
hr/12Hour in 12-hour format8
0hr/12Hour in 12-hour format with leading zero08
msMilliseconds1
0msMilliseconds with leading zeros001
minMinutes9
0minMinutes with leading zero09
mMonth number8 (August)
0mMonth number with leading zero08
mnMonth nameFebruary
sSeconds20
0sSeconds with leading zero03
ampmAM/PM indicatorPM / AM
tzTimezone abbreviationUTC

Example

$timeToDate[$timestamp;%y%-%m%-%d%]

Result:

2025-8-15

On this page