User Tools

Site Tools


Date(date_as_text, format)

Converts date_as_text into date represented as number according to format string.

Example Result
date('20140101','yyyyMMdd') 41640
date('14-01-01','yy-MM-dd') 41640
date('20140101','yy-MM-dd') #Can't convert to date

Format string components


Character Description
d The day of the month, from 1 through 31.
dd The day of the month, from 01 through 31.
ddd The abbreviated name of the day of the week.
M The month, from 1 through 12.
MM The month, from 01 through 12.
MMM The abbreviated name of the month.
MMMM The full name of the month.
y The year, from 0 to 99.
yy The year, from 00 to 99.
yyyy The year as a four-digit number.

See also

syntax/functions/date.txt · Last modified: 2015/04/03 20:52 by elenap