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.

DateObject an object representing a date of any granularity (year, hour, instant, ...)

TimeObject an object representing a time of day

DateInterval an object representing an interval of time

CalendarType  ▪  TimeZone  ▪  TimeSystem  ▪  DateFormat

Now current date and time

Today, Tomorrow, Yesterday day specifications

CurrentDate date to a specified granularity (year, day, hour, )

NextDate, PreviousDate next, previous dates of specified granularity (year, day, hour, )

InfiniteFuture, InfinitePast representations for unbounded times

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

FromDateString convert a date string to a date object

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

$DateStringFormat default date string format

DateList date elements as numbers in {y,m,d,h,m,s} format

AbsoluteTime absolute time in seconds

Clock real-time dynamic clock variable

DatedUnit represent a currency unit at a specific date

Time Zones »

LocalTime local time at any location

LocalTimeZone  ▪  TimeZoneConvert

TimeZoneOffset numeric offset between different time zones

$TimeZone resettable default time zone

$SystemTimeZone time zone used by your system

$TimeZoneEntity resettable time zone entity corresponding to your locale

Calendars

CalendarConvert convert a date from one calendar to another

CalendarData discover available calendars and their properties

LeapVariant mark leap months, leap weeks or other leap elements of a date

"Gregorian"  ▪  "Jewish"  ▪  "Chinese"  ▪  "ISOWeek"  ▪  ...

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

DateSelect select dates based on a criterion

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

DateBounds find the first and last dates from a list of dates

Duration  ▪  MinDate  ▪  MaxDate

TimeZoneConvert convert between different time zones

TimeSystemConvert convert between different time systems

ConformDates gives a list of dates with conforming properties

Nearest find nearest dates or times in a list

Tests on Dates

DateWithinQ test if one date is contained within another

DateOverlapsQ test if two dates are overlapping

DateObjectQ test if an expression is a valid date object

TimeObjectQ test if an expression is a valid time object

LeapYearQ determine if the date is in a leap year

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

Astronomical Information »

AstroPosition observed position of astronomical objects from a location at a given time

Sunrise, Sunset time of sunrise, sunset for any location

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

JulianDate  ▪  FromJulianDate

Date & Time Visualization »

TimelinePlot display dates and times on a timeline, with labels, etc.

DateListPlot plot date-value curves

DateHistogram  ▪  DateListLogPlot  ▪  StackedDateListPlot  ▪  ...

Time Series Processing »

TimeSeries represent a time series for processing

MovingMap  ▪  TimeSeriesMap  ▪  Mean  ▪  ...

Financial Time Series »

TradingChart trading chart with technical indicators

InteractiveTradingChart  ▪  CandlestickChart  ▪  KagiChart  ▪  ...

Descriptive Statistics for Dates & Times

ConformDates conform a list of dates or times

Mean compute descriptive statistics for dates and times

BiweightLocation  ▪  BiweightMidvariance  ▪  CentralMoment  ▪  Correlation  ▪  Covariance  ▪  Cumulant  ▪  InterquartileRange  ▪  Kurtosis  ▪  Mean  ▪  MeanDeviation  ▪  Median  ▪  MedianDeviation  ▪  QnDispersion  ▪  Quantile  ▪  QuartileDeviation  ▪  Quartiles  ▪  QuartileSkewness  ▪  RankedMax  ▪  RankedMin  ▪  Skewness  ▪  SnDispersion  ▪  StandardDeviation  ▪  TrimmedMean  ▪  TrimmedVariance  ▪  Variance  ▪  WinsorizedMean  ▪  WinsorizedVariance

Distributions for Dates & Times

DateDistribution a distribution of dates from any numerical distribution

TimeDistribution a distribution of times from any numerical distribution

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

UnixTime  ▪  FromUnixTime  ▪  FromAbsoluteTime

CPU Timing »

Timing  ▪  AbsoluteTiming  ▪  TimeConstrained  ▪  SessionTime  ▪  ...

Scheduled Tasks »

ScheduledTask represent a task scheduled to run at particular times

SessionSubmit  ▪  LocalSubmit  ▪  CloudSubmit  ▪  HandlerFunctions  ▪  TaskObject