{ "function": "format_date", "description": "Format a date type or string into a custom string format. Uses Qt date/time format strings. See QDateTime::toString.", "arguments": [ {"arg":"datetime","description":"date, time or datetime value"}, {"arg":"format","description":"String template used to format the string.
ExpressionOutput
dthe day as number without a leading zero (1 to 31)
ddthe day as number with a leading zero (01 to 31)
dddthe abbreviated localized day name (e.g. 'Mon' to 'Sun')
ddddthe long localized day name (e.g. 'Monday' to 'Sunday')
Mthe month as number without a leading zero (1-12)
MMthe month as number with a leading zero (01-12)
MMMthe abbreviated localized month name (e.g. 'Jan' to 'Dec')
MMMMthe long localized month name (e.g. 'January' to 'December')
yythe year as two digit number (00-99)
yyyythe year as four digit number

These expressions may be used for the time part of the format string:

ExpressionOutput
hthe hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hhthe hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
Hthe hour without a leading zero (0 to 23, even with AM/PM display)
HHthe hour with a leading zero (00 to 23, even with AM/PM display)
mthe minute without a leading zero (0 to 59)
mmthe minute with a leading zero (00 to 59)
sthe second without a leading zero (0 to 59)
ssthe second with a leading zero (00 to 59)
zthe milliseconds without leading zeroes (0 to 999)
zzzthe milliseconds with leading zeroes (000 to 999)
AP or Ainterpret as an AM/PM time. AP must be either \"AM\" or \"PM\".
ap or aInterpret as an AM/PM time. ap must be either \"am\" or \"pm\".
"}], "examples": [ { "expression":"format_date('2012-05-15','dd.MM.yyyy')", "returns":"'15.05.2012'"} ] }