Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
DateObject
  • See Also
    • TimeObject
    • Now
    • DateInterval
    • DateValue
    • TimeZoneConvert
    • CalendarConvert
    • FromDateString
    • DateDifference
    • DateString
    • DateList
    • AbsoluteTime
    • UnixTime
    • FromUnixTime
    • JulianDate
    • FromJulianDate
    • TimeSeries
    • EventSeries
    • CurrentDate
    • DayRound

    • Interpreter Types
    • Date
    • DateTime
  • Related Guides
    • Date & Time
    • Time Series Processing
    • Free-Form & External Input
    • Weather Data
    • People & History
    • Financial Computation
    • Scientific Data Analysis
    • Database Connectivity
    • WDF (Wolfram Data Framework)
    • Knowledge Representation & Access
    • See Also
      • TimeObject
      • Now
      • DateInterval
      • DateValue
      • TimeZoneConvert
      • CalendarConvert
      • FromDateString
      • DateDifference
      • DateString
      • DateList
      • AbsoluteTime
      • UnixTime
      • FromUnixTime
      • JulianDate
      • FromJulianDate
      • TimeSeries
      • EventSeries
      • CurrentDate
      • DayRound

      • Interpreter Types
      • Date
      • DateTime
    • Related Guides
      • Date & Time
      • Time Series Processing
      • Free-Form & External Input
      • Weather Data
      • People & History
      • Financial Computation
      • Scientific Data Analysis
      • Database Connectivity
      • WDF (Wolfram Data Framework)
      • Knowledge Representation & Access

DateObject[]

gives the current local date.

DateObject[date]

gives a date object corresponding to the given date specification.

DateObject[rdate,gran]

gives the date object of calendar granularity gran that includes the reference date rdate.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
CalendarType  
DateFormat  
DateGranularity  
TimeSystem  
TimeZone  
Applications  
Properties & Relations  
See Also
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • TimeObject
    • Now
    • DateInterval
    • DateValue
    • TimeZoneConvert
    • CalendarConvert
    • FromDateString
    • DateDifference
    • DateString
    • DateList
    • AbsoluteTime
    • UnixTime
    • FromUnixTime
    • JulianDate
    • FromJulianDate
    • TimeSeries
    • EventSeries
    • CurrentDate
    • DayRound

    • Interpreter Types
    • Date
    • DateTime
  • Related Guides
    • Date & Time
    • Time Series Processing
    • Free-Form & External Input
    • Weather Data
    • People & History
    • Financial Computation
    • Scientific Data Analysis
    • Database Connectivity
    • WDF (Wolfram Data Framework)
    • Knowledge Representation & Access
    • See Also
      • TimeObject
      • Now
      • DateInterval
      • DateValue
      • TimeZoneConvert
      • CalendarConvert
      • FromDateString
      • DateDifference
      • DateString
      • DateList
      • AbsoluteTime
      • UnixTime
      • FromUnixTime
      • JulianDate
      • FromJulianDate
      • TimeSeries
      • EventSeries
      • CurrentDate
      • DayRound

      • Interpreter Types
      • Date
      • DateTime
    • Related Guides
      • Date & Time
      • Time Series Processing
      • Free-Form & External Input
      • Weather Data
      • People & History
      • Financial Computation
      • Scientific Data Analysis
      • Database Connectivity
      • WDF (Wolfram Data Framework)
      • Knowledge Representation & Access

DateObject

DateObject[]

gives the current local date.

DateObject[date]

gives a date object corresponding to the given date specification.

DateObject[rdate,gran]

gives the date object of calendar granularity gran that includes the reference date rdate.

Details and Options

  • DateObject represents a location in the temporal axis represented numerically using a calendar, time zone and time system.
  • DateObject can represent different resolutions by using day or month granularities, etc.
  • In DateObject[date], the following date and time specifications can be given as date:
  • dateDateObject specification
    {y,m,d,h,m,s}DateList specification
    timeAbsoluteTime specification
    "string"DateString specification
    {"string",fmt}date string formed from the specified format
  • Values of m, d, h, m, s outside their normal ranges are appropriately reduced. Noninteger values of d, h, m, and s can also be used.
  • In the form DateObject[{"string",{"e1","e2",…}}], the "ei" can be any DateString element, such as "Year", "MonthName", "Hour", etc.
  • DateObject[{"string",{"e1","e2",…}}] uses the "ei" to fill in elements of {y,m,d,h,m,s}. Those not filled in are taken to have default values {yc,1,1,0,0,0}, where yc is the current year.
  • In DateObject[{"string",{"e1","e2",…}}], the "ei" are extracted from "string" in the order given, and can be separated by any non-alphanumeric characters.
  • DateObject[{"string",{"e1","sep12","e2","sep23",…}}] extracts elements using the explicit separators specified.
  • DateObject[time] gives a date object corresponding to an AbsoluteTime specification.
  • For an image with Exif date time information, DateObject[image] returns that information as a standard DateObject expression.
  • DateObject[rdate,gran] represents a discrete calendar element of granularity gran for the reference date rdate. For example, DateObject[{2017,1,16},"Week"] represents the week beginning Monday, January 16, 2017.
  • DateObject[rdate,gran] will normalize to the canonical representation of the DateObject for that granularity. For example, DateObject[{2016},"Decade"] will canonicalize to DateObject[{2010},"Decade"].
  • In DateObject[rdate,gran], the calendar granularity gran can be any of the following:
  • "Millennium"1000-year period beginning with year XX00
    "MillenniumBeginning01"1000-year period beginning with year XX01
    "Century"100-year period beginning with year XX00
    "CenturyBeginning01"100-year period beginning with year XX01
    "Decade"10-year period including the date
    "Year"year including the date
    "Quarter"3-month quarter including the date
    "Month"month including the date
    "Week"week beginning Monday including the date
    "WeekBeginningSunday"week beginning Sunday including the date
    "Day"day including the date
    "Hour"hour including the date
    "Minute"minute including the date
    "Second"second including the date
    "Decisecond"moment accurate to 0.1 seconds
    "Centisecond"moment accurate to 0.01 seconds
    "Millisecond"moment accurate to 0.001 seconds
    "Microsecond"moment accurate to 10^-6 seconds
    "Nanosecond"moment accurate to 10^-9 seconds
    "Instant"the exact instant specified
  • DateObject[rdate,n] where n is a non-negative Integer represents a date accurate to 10-n seconds (e.g. DateObject[rdate, 6] corresponds to 10-6 seconds accuracy, the same as DateObject[rdate,"Microsecond"]).
  • The maximum available value for n in DateObject[rdate,n] is 9.
  • DateObject[rdate,"MidpointInstant"] can be used to construct a DateObject with granularity "Instant" with a reference date at the mid-point of rdate.
  • DateObject[list] is taken to represent a date with granularity as follows:
  • DateObject[{y}]"Year"
    DateObject[{y,m}]"Month"
    DateObject[{y,m,d}]"Day"
    DateObject[{y,m,d,h}]"Hour"
    DateObject[{y,m,d,h,m}]"Minute"
    DateObject[{y,m,d,h,m,s}]"Instant"
    DateObject[t]"Instant"
  • DateObject["string"] is taken to represent a date with granularity inferred from the information given in the string.
  • The following options can be given:
  • CalendarType Automaticcalendar system being used
    DateFormat Automaticformat used to display date
    DateGranularity Automaticcalendar granularity for the date
    TimeSystem Automatictime system being used
    TimeZone Automatictime zone being used
  • Possible CalendarType specifications are: Automatic, "Gregorian" and "Julian", with additional calendar types as given by CalendarData.
  • The default value of CalendarType is Automatic, which uses the proleptic Gregorian calendar in which there is no year 0. Years prior to the Common Era are negative, and those after are positive.
  • TimeZone specifications should be a numerical offset from GMT, a time zone string, None or a geo entity location.
  • TimeSystem specifications include "UTC", "TAI", "TT" and others. The default value is "UT", a form of UTC that smears leap seconds over the 24 hours before their addition or removal.
  • TimeSystem specifications other than "UTC" and "UT" make TimeZoneAutomatic be interpreted as TimeZone0 because they are typically always used in the GMT time zone.
  • With a typical value for $DateStringFormat, the display of DateObject[{y,m,d,h,m,s}] will truncate fractional seconds.
  • DateObject allows addition and subtraction of time quantities.
  • Subtracting two DateObject expressions yields a time quantity.
  • Functions such as NumericalSort, Greater, Max, etc. work with DateObject.
  • Information for a DateObject may include the following properties:
  • "Date"string form of the specified date
    "Granularity"calendar granularity
    "TimeZone"time zone
    "CalendarType"calendar type

Examples

open all close all

Basic Examples  (6)

Find the current date:

Date object expression representing the year 2022:

Date object representing the week beginning Monday, August 1, 2022:

Expand the date to a granularity of "Month":

Convert an absolute time to a date object:

Represent a specific year and month:

Or represent just a year:

Add 2000 weeks to a date:

Subtract two dates to get a time quantity:

Scope  (7)

Date objects are interpreted using their standard normalized form:

This includes normalization for values preceding the first day of the year:

Strings are automatically interpreted when possible:

DateObject automatically chooses the first date compatible with the input information:

The granularity of a date object may be changed by wrapping it in a DateObject expression with an explicit granularity specification:

Date objects including additional elements beyond what are required for a given calendar granularity will be automatically normalized to their canonical form:

Combine a DateObject and a TimeObject into a single expression:

Date and time of an image:

Options  (9)

CalendarType  (2)

Find the current date on the Jewish calendar:

Represent a date on the Islamic calendar:

DateFormat  (2)

Use long date format:

Specify your own format:

DateGranularity  (1)

By default, dates are generated with "Instant" granularity:

Use DateGranularity"Month" to generate a "Month" granular date:

TimeSystem  (2)

Find the current date in International Atomic Time:

Represent the leap second that occurred on December 31, 2016, in Coordinated Universal Time:

The "UTC" and "UT" time systems are identical on days with no leap second added:

They differ on days with a leap second, with the difference increasing from 0 to 1 second during the day:

TimeZone  (2)

Find the current date in Greenwich, United Kingdom:

Specify no time zone for a date object:

Represent 11am Eastern Standard Time on March 3, 2001:

TimeZone specifications can be used with all supported calendar types:

For date string inputs, if a time zone is detected, the resulting DateObject will account for the difference in time zone offset:

Applications  (1)

ClockGauge can be used to visualize a date on an analog clock:

Properties & Relations  (8)

AbsoluteTime represents dates as seconds since the beginning of 1900:

DateList represents dates as lists of date elements:

DateString represents dates as strings:

DateValue can be used to extract a granular date:

Arithmetic using date objects returns units in the coarsest granularity of the dates:

Granular DateObject expressions with different time zones within the same calendar granularity are considered Equal:

But are not SameQ:

Compare date objects to determine their sequence of occurrence:

GreaterThan, LessThan and related test functions also work with DateObject expressions:

Comparisons of date objects with unequal precision and overlapping time periods will return unevaluated:

Use Max to find the latest date in a list:

NumericalSort will arrange dates in sequence:

See Also

TimeObject  Now  DateInterval  DateValue  TimeZoneConvert  CalendarConvert  FromDateString  DateDifference  DateString  DateList  AbsoluteTime  UnixTime  FromUnixTime  JulianDate  FromJulianDate  TimeSeries  EventSeries  CurrentDate  DayRound

Interpreter Types: Date  DateTime

Function Repository: FromISOTimestamp

Related Guides

    ▪
  • Date & Time
  • ▪
  • Time Series Processing
  • ▪
  • Free-Form & External Input
  • ▪
  • Weather Data
  • ▪
  • People & History
  • ▪
  • Financial Computation
  • ▪
  • Scientific Data Analysis
  • ▪
  • Database Connectivity
  • ▪
  • WDF (Wolfram Data Framework)
  • ▪
  • Knowledge Representation & Access

Related Links

  • An Elementary Introduction to the Wolfram Language : Dates and Times

History

Introduced in 2014 (10.0) | Updated in 2016 (11.0) ▪ 2017 (11.1) ▪ 2017 (11.2) ▪ 2019 (12.0) ▪ 2021 (13.0) ▪ 2023 (13.3) ▪ 2024 (14.1)

Wolfram Research (2014), DateObject, Wolfram Language function, https://reference.wolfram.com/language/ref/DateObject.html (updated 2024).

Text

Wolfram Research (2014), DateObject, Wolfram Language function, https://reference.wolfram.com/language/ref/DateObject.html (updated 2024).

CMS

Wolfram Language. 2014. "DateObject." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/DateObject.html.

APA

Wolfram Language. (2014). DateObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DateObject.html

BibTeX

@misc{reference.wolfram_2025_dateobject, author="Wolfram Research", title="{DateObject}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/DateObject.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_dateobject, organization={Wolfram Research}, title={DateObject}, year={2024}, url={https://reference.wolfram.com/language/ref/DateObject.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English