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
FromDateString
  • See Also
    • DateString
    • DateObject
    • DateValue
    • DateFormat
    • DateList
  • Related Guides
    • Date & Time
    • See Also
      • DateString
      • DateObject
      • DateValue
      • DateFormat
      • DateList
    • Related Guides
      • Date & Time

FromDateString["string"]

gives a date object corresponding to the date represented by "string".

FromDateString["string",{"e1","e2",…}]

gives the date object obtained by extracting elements "ei" from "string".

FromDateString["string",fmt]

gives the date object obtained using the date format fmt.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
CalendarType  
DateFormat  
DateGranularity  
TimeZone  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • DateString
    • DateObject
    • DateValue
    • DateFormat
    • DateList
  • Related Guides
    • Date & Time
    • See Also
      • DateString
      • DateObject
      • DateValue
      • DateFormat
      • DateList
    • Related Guides
      • Date & Time

FromDateString

FromDateString["string"]

gives a date object corresponding to the date represented by "string".

FromDateString["string",{"e1","e2",…}]

gives the date object obtained by extracting elements "ei" from "string".

FromDateString["string",fmt]

gives the date object obtained using the date format fmt.

Details and Options

  • FromDateString parses any string representing a date into its Wolfram Language canonical DateObject form, taking into account locale and time zone information.
  • FromDateString accepts arrays of date strings.
  • In FromDateString["string",fmt], the format specification fmt typically includes:
  • Automaticdetermine date format automatically
    "format"named date format (e.g. "ISODateTime")
    {elem1,elem2,…}ordered elements (e.g. "Year", "Day", …)
    assocAssociation of date format parameters
    localelocale specification (e.g. "en_US")
  • locale uses the default date formatting information specified by the given locale, including element ordering, language, writing script and delimiters. Locale specifications may be given using locale strings such as "en_US", "LanguageLocale" entities or "Language" entities.
  • The following parameters may be specified in assoc specifications:
  • "Elements"Automaticdate string elements to include
    "Language"$Languagelanguage for text elements
    "WritingScript"Automaticwriting script for text elements
    "Delimiters"Automaticdelimiters to use between date elements
  • "Language"lang specifications may be given using a language string (i.e. "Spanish"), ISO-639 language code (i.e. "es"), a "Language" entity or "LanguageLocale" entity.
  • "WritingScript"script specifications may be given using a writing script string (i.e. "Latin"), ISO-15924 writing script code (i.e. "Latn") or a "WritingScript" entity.
  • For <|"Delimiters"delims|>, the delimiters will be inserted in the list of elements following the behavior of Riffle.
  • Named format specifications include:
  • "Date"full dateThursday 4 April 2019
    "DateShort"short dateThu 4 Apr 2019
    "Time"full time15:57:49
    "DateTime"full date and timeThursday 4 April 2019 15:57:57
    "DateTimeShort"short date and timeThu 4 Apr 2019 15:58:08
    "ISODate"ISO-8601 date2019-04-04
    "ISOWeekDate"ISO week date2019-W14-4
    "ISOOrdinalDate"ISO ordinal date2019-094
    "ISODateTime"ISO date and time2019-04-04T15:58:57
  • Named formats that include locale-based format specifications include:
  • "LocaleDateCompact"date using only numeric elements (e.g. 1/12/21)
    "LocaleDateShort"date using abbreviated day/month (e.g. Jan. 12, 2021)
    "LocaleDateLong"date using full day/month (e.g. January 12, 2021)
    "LocaleDateFull"date with day name (e.g. Tuesday, January 12, 2021)
    "LocaleTimeCompact"time excluding seconds (e.g. 2:07 PM)
    "LocaleTimeShort"time with seconds (e.g. 2:07:23 PM)
    "LocaleTimeLong"time with time zone abbreviation (e.g. 2:07:23 PM CST)
    "LocaleTimeFull"time with long time zone (e.g. 2:07:23 PM Central Standard Time)
    "LocaleDateTimeCompact"compact date with time (e.g. 1/12/21, 2:07:23 PM)
    "LocaleDateTimeShort"medium date with time (e.g. Jan 12, 2021, 2:07:23 PM)
    "LocaleDateTimeLong"long date with time (e.g. January 12, 2021 at 2:07:23 PM)
    "LocaleDateTimeFull"full date and time (e.g. Tuesday, January 12, 2021 at 2:07:23 PM)
  • The exact elements included and their order are determined by the locale used alongside these named formats.
  • Elements related to year include the following:
  • "Year"full year2005
    "YearShort"2-digit year05
    "ISOYear"ISO-8601 year2005
    "YearUnsigned"year without sign2005
    "ADBC"AD or BCAD
    "CEBCE"CE or BCEBCE
  • Elements related to month include the following:
  • "Month"2-digit month number08
    "MonthShort"1- or 2-digit month number8
    "MonthName"month nameAugust
    "MonthNameShort"month name in short formAug
    "MonthNameInitial"first letter of month nameA
  • Elements related to day of the month include the following:
  • "Day"2-digit day of the month09
    "DayShort"1- or 2-digit day9
  • Elements related to day of the week include the following:
  • "DayName"day of the weekWednesday
    "DayNameShort"short day of the weekWed
    "DayNameInitial"first letter of day nameW
    "ISOWeekDay"ISO-8601 day number4
  • Elements related to hour include the following:
  • "Hour"
  • 2-digit hour
  • 19
    "Hour12"2-digit 12-hour clock07
    "Hour24"2-digit 24-hour clock19
    "HourShort"1- or 2-digit hour19
    "Hour12Short"1- or 2-digit 12-hour clock7
    "Hour24Short"1- or 2-digit 24-hour clock19
    "AMPM"AM or PMPM
    "AMPMLowerCase"am or pmpm
  • Elements related to minute include the following:
  • "Minute"2-digit minute05
    "MinuteShort"1- or 2-digit minute5
  • Elements related to second include the following:
  • "Second"2-digit seconds03
    "SecondShort"1- or 2-digit seconds3
    "SecondExact"seconds including fractions03.199
    "SecondFraction"fractional part of second0.2
    "Millisecond"3-digit milliseconds019
    "MillisecondShort"1-, 2-, or 3-digit milliseconds19
    "MillisecondExact"millisecond with fraction019.99
    "MillisecondFraction"fractional part of millisecond0.999809
  • Elements related to multiple date elements include the following:
  • "Quarter"quarter number1
    "QuarterName"quarter of yearQuarter 1
    "QuarterNameShort"quarter of year in short formQ1
    "Week"2-digit week number 02
    "WeekShort"1- or 2-digit week number 2
  • Additional ISO-8601 date elements include the following:
  • "ISOYearDay"3-digit day of the year094
    "ISOYearDayShort"1-, 2- or 3-digit day of year94
  • Elements related to time zone include the following:
  • "TimeZoneGMTRelative"GMT offsetGMT-04:00
    "ISOTimeZone"ISO-8601 GMT offset-04:00
    "TimeZoneName"time zone nameEastern Standard Time
    "TimeZoneNameShort"short time zone nameEST
  • Any other string given in the list of elements is assumed to appear literally in the date string.
  • Possible options include:
  • CalendarType Automaticoutput calendar system
    DateFormat Automaticformat used to display date
    DateGranularity Automaticoutput calendar granularity
    TimeSystemAutomatictime system being used
    TimeZone Automaticoutput time zone
  • Possible CalendarType specifications include Automatic, "Gregorian", "Julian" and all other calendars in CalendarData["DateCalendar"].
  • TimeZone specifications should be a numerical offset from GMT, a time zone string or entity, None or a geo entity location.
  • DateFormat may be used to specify the output format of the DateObject returned by FromDateString.
  • "string" inputs are always assumed to be in the "Gregorian" calendar system.

Examples

open all close all

Basic Examples  (4)

Get a date object from a date string input:

Parse a date string using a specific date format:

Date format specifications can include elements, language, writing script and delimiters:

A locale can be specified as the date format, which provides the elements and their ordering, as well as the language and script:

Scope  (6)

When no reference format is given, FromDateString will attempt to determine the date format automatically:

FromDateString[date] is equivalent to FromDateString[date,Automatic]:

A format specification may be a named date format or a single date element:

An explicit list of date format elements may also be given:

The language used by text elements in the date format may be specified using a "Language" entity:

Language specifications may also be given using a "LanguageLocale" entity, ISO-639 language code or language string:

Some languages have multiple frequently used writing scripts, which can be differentiated with a "WritingScript" entity:

Writing script specifications may also be given using ISO-15924 writing script codes or writing script strings, or as part of a language specification using a "LanguageLocale" entity:

When a single delimiter is given, it will be inserted between each date format element:

When a list of delimiters is given, they will be interspersed between the date format elements:

A locale may also be used as a format specification, which will use the appropriate elements, ordering, language, writing script and delimiters for the locale:

Locale specifications may also be given as a "Language" entity or "LanguageLocale" entity:

Options  (7)

CalendarType  (2)

Generate Japanese calendar date from a date string input:

Date string inputs are implicitly Gregorian calendar dates, so conversion will be done automatically:

DateFormat  (2)

By default, generated dates will use the default DateObject date format:

Specifying a DateFormat will ensure the resulting object typesets accordingly:

Specify your own date format:

DateGranularity  (1)

By default, FromDateString determines the granularity of the output based on the input string:

Use DateGranularity"Instant" to generate a date with a specific granularity:

TimeZone  (2)

FromDateString will attempt to parse time zone information when available, returning in the parsed time zone by default:

If not time zone information is present, the string will be assumed to be in $TimeZone:

TimeZonezone can be used to explicitly specify a desired output time zone:

A time zone specification of None will produce an object without an embedded time zone:

Possible Issues  (1)

In some cases, date string inputs may be ambiguous:

In such cases, a locale may be used to disambiguate the expected order of elements:

See Also

DateString  DateObject  DateValue  DateFormat  DateList

Related Guides

    ▪
  • Date & Time

History

Introduced in 2021 (12.3) | Updated in 2023 (13.3)

Wolfram Research (2021), FromDateString, Wolfram Language function, https://reference.wolfram.com/language/ref/FromDateString.html (updated 2023).

Text

Wolfram Research (2021), FromDateString, Wolfram Language function, https://reference.wolfram.com/language/ref/FromDateString.html (updated 2023).

CMS

Wolfram Language. 2021. "FromDateString." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/FromDateString.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_fromdatestring, organization={Wolfram Research}, title={FromDateString}, year={2023}, url={https://reference.wolfram.com/language/ref/FromDateString.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