Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


gives the specified element of the current date and time.

gives a list of the specified elements of the current date and time.

gives the specified element of the specified date.

gives the result in the specified form.


  • Possible elements include:
  • "Year"full year (e.g. 2015)
    "YearShort"twodigit year (e.g. 15)
    "YearUnsigned"year without a sign
    "YearRomanNumeral"year using Roman numerals
    "Quarter"quarter number (e.g. 1)
    "QuarterName"quarter of year (e.g. "Quarter 1")
    "QuarterNameShort"quarter of year in short form (e.g. "Q1")
    "Month"month number (e.g. 8)
    "MonthName"month name (e.g. "August")
    "MonthNameShort"month name in short form (e.g. "Aug")
    "MonthNameInitial"first letter of month name (e.g. "A")
    "MonthRomanNumeral"month using Roman numerals
    "Week"week number (e.g. 12)
    "DayName"day of the week (e.g. Wednesday)
    "DayNameShort"day of the week in short form (e.g. "Wed")
    "DayNameInitial"first letter of day name (e.g. "W")
    "Day"day of the month (e.g. 9)
    "ISOWeekDay"day number of week conforming to ISO-8601 (e.g. 4)
    "ISOYearDay"day of the year conforming to ISO-8601 (e.g. 182)
    "Hour"hour on 12- or 24-hour clock, based on system preferences
    "Hour12"hour on 12hour clock (e.g. 7)
    "Hour24"hour on 24hour clock (e.g. 19)
    "AMPM"AM or PM
    "AMPMLowerCase"am or pm
    "Minute"minute (e.g. 15)
    "Second"integer seconds
    "SecondExact"seconds including fractions
    "CalendarType"calendar type (e.g. "Gregorian")
    "TimeZone"time zone as offset from GMT
  • Possible forms include:
  • Automaticnumbers, symbols, or strings, chosen automatically
    Integerclosest integer
    Realreal value
    Quantityvalue including units
    DateObjectcomplete date object
    TimeObjectcomplete time object
  • In DateValue[date,], date can be specified as a DateObject or TimeObject, or results from DateList, DateString, or AbsoluteTime.
  • DateValue[date,spec,DateObject] can be used to give a DateObject that is granular only down to the level (e.g. day, month, year) specified by spec.
  • DateValue[GeoPosition[{lat,long,h,t}]] gives a DateObject of the time specified by t.
  • DateValue accepts a list of DateObject or TimeObject date specifications.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Get the current year:

Click for copyable input

Get multiple elements from the current date:

Click for copyable input

Get the month name from a given date:

Click for copyable input

Find the current "TimeZone" offset as a Quantity:

Click for copyable input
Introduced in 2014