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

Date & Time

Mathematica has a highly flexible system for handling dates and times in almost any format, automatically converting between formats and, when necessary, parsing strings representing dates.


DateString current or specified date as a string in many possible formats

 ▪  ▪  ▪  ▪

$DateStringFormat default date string format

$TimeZone resettable current time zone

DateList date elements as numbers in format

AbsoluteTime absolute time in seconds

Clock real-time dynamic clock variable

Date Operations

DateRange generate a list of dates

DatePlus add or subtract days, weeks, etc. in a date list or string

DateDifference find the difference in days, weeks, etc. between two dates

LeapYearQ determine if the date is in a leap year

Monday ▪ Tuesday ▪ Wednesday ▪ Thursday ▪ Friday ▪ Saturday ▪ Sunday

Day Operations

DayRange generate a list of days

DayPlus add or subtract days

DayRound round to the nearest day of a specific type

DayCount compute the difference between days

DayMatchQ determine the day type

BusinessDayQ determine if the day is a business day

DayName determine the day of the week

CalendarData discover available calendars


DateListPlot, DateListLogPlot plot data associated with dates in any format

Date Import/Export

"Table" ▪ "XLS" ▪ "MDB" ▪ "ApacheLog" ▪ "MBOX" ▪ ...

DatePattern date pattern for string manipulation

"XLS" ▪ "ApacheLog" ▪ "MBOX"

CPU Timing »

Timing ▪ AbsoluteTiming ▪ TimeConstrained ▪ SessionTime ▪ ...

Timed Evaluations »

RunScheduledTask ▪ ScheduledTasks ▪ ...