This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DatePattern

DatePattern[{"e1", "e2", ...}]
represents the characters of a date with elements of type "ei" in StringExpression.
DatePattern[{"e1", "e2", ...}, sep]
allows separators that match the string expression sep.
  • Possible element types "ei" are: "Year", "Quarter", "Month", "MonthName", "Day", "DayName", "Hour", "AMPM", "Minute", "Second".
  • If no explicit separator is specified, the "ei" must be separated by /, -, : or . characters.
Compare a string to a list of date elements:
In[1]:=
Click for copyable input
Out[1]=
 
Compare to a list of time elements:
In[1]:=
Click for copyable input
Out[1]=
 
Compare to a pattern with all separators explicitly given:
In[1]:=
Click for copyable input
Out[1]=
New in 6