Several Macros including the Today Macro take a Date Format String as an optional argument. This string can be a combination of ordinary text, with some special characters that get substituted by parts of the date:
-
DDD
- day of week in full (eg, "Monday")
-
ddd
- short day of week (eg, "Mon")
-
DD
- day of month
-
0DD
- adds a leading zero
-
DDth
- adds a suffix
-
WW
- ~ISO-8601 week number of year
-
0WW
- adds a leading zero
-
MMM
- month in full (eg, "July")
-
mmm
- short month (eg, "Jul")
-
MM
- month number
-
0MM
- adds leading zero
-
YYYY
- full year
-
YY
- two digit year
-
wYYYY
- full year with respect to week number
-
wYY
two digit year with respect to week number
-
hh
- hours
-
0hh
- adds a leading zero
-
hh12
- hours in 12 hour clock
-
0hh12
- hours in 12 hour clock with leading zero
-
mm
- minutes
-
0mm
- minutes with leading zero
-
ss
- seconds
-
0ss
- seconds with leading zero
-
am
or pm
- lower case AM/PM indicator
-
AM
or PM
- upper case AM/PM indicator
Examples
DDth MMM YYYY
- 16th February 2011
DDth mmm hh:mm:ss
- 16th Feb 2011 11:38:42