Date & Time

The Wolfram Language has a highly flexible system for representing dates and times symbolically and performing computations on them. It can also input and output dates and times in a wide range of formats, as well as handle all standard calendars.

ReferenceReference

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

"DateTime"  ▪  "MonthName"  ▪  "DayName"  ▪  "Hour24"  ▪  ...

$DateStringFormat default date string format

DateList date elements as numbers in format

AbsoluteTime absolute time in seconds

Clock real-time dynamic clock variable

DateObject an object representing a date

TimeObject an object representing a time of day

Now current date and time

Time Zones »

LocalTime local time at any location

LocalTimeZone  ▪  TimeZoneConvert

$TimeZone resettable default time zone

Elements of Dates

DateValue extract year, month, day, hour, etc. from dates

DayName determine day of the week

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

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

CalendarConvert convert a date from one calendar to another

TimeZoneConvert convert between different time zones

LeapYearQ determine if the date is in a leap year

Day Operations

Today  ▪  Tomorrow  ▪  Yesterday

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

CalendarData discover available calendars

Astronomical Information »

Sunrise, Sunset time of sunrise, sunset for any location

DaylightQ  ▪  SunPosition  ▪  MoonPosition  ▪  MoonPhase  ▪  SiderealTime  ▪  ...

Visualization & Analysis

DateListPlot, DateListLogPlot plot data associated with dates in any format

TimeSeries  ▪  EventSeries  ▪  TimeSeriesModelFit  ▪  ...

Date Import/Export

Interpreter interpret a string as a date, potentially with semantic transformations

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

DatePattern date pattern for string manipulation

"XLS"  ▪  "ApacheLog"  ▪  "MBOX"

CPU Timing »

Timing  ▪  AbsoluteTiming  ▪  TimeConstrained  ▪  SessionTime  ▪  ...

Scheduled Tasks »

ScheduledTask represent a task scheduled to run at particular times

RunScheduledTask  ▪  ScheduledTasks  ▪  ...