WOLFRAM

gives the default format to use for date strings generated by DateString.

Details

  • $DateStringFormat can be set to any format specification supported by DateString.
  • In the cloud, $DateStringFormat is set according to the locale information given by $GeoLocationCountry.
  • A typical initial default setting is $DateStringFormat="DateTimeShort".
  • Named date string formats 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

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Use long date format:

Out[1]=1

Specify your own format:

Out[1]=1

Generalizations & Extensions  (1)Generalized and extended use cases

Include a time zone:

Out[1]=1

Properties & Relations  (2)Properties of the function, and connections to other functions

Use $DateStringFormat to set the default format for date strings within DatePlus:

Out[1]=1

Date string formats match date patterns:

Out[1]=1
Out[2]=2
Wolfram Research (2007), $DateStringFormat, Wolfram Language function, https://reference.wolfram.com/language/ref/$DateStringFormat.html.
Wolfram Research (2007), $DateStringFormat, Wolfram Language function, https://reference.wolfram.com/language/ref/$DateStringFormat.html.

Text

Wolfram Research (2007), $DateStringFormat, Wolfram Language function, https://reference.wolfram.com/language/ref/$DateStringFormat.html.

Wolfram Research (2007), $DateStringFormat, Wolfram Language function, https://reference.wolfram.com/language/ref/$DateStringFormat.html.

CMS

Wolfram Language. 2007. "$DateStringFormat." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$DateStringFormat.html.

Wolfram Language. 2007. "$DateStringFormat." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$DateStringFormat.html.

APA

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

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

BibTeX

@misc{reference.wolfram_2025_$datestringformat, author="Wolfram Research", title="{$DateStringFormat}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/$DateStringFormat.html}", note=[Accessed: 10-March-2025 ]}

@misc{reference.wolfram_2025_$datestringformat, author="Wolfram Research", title="{$DateStringFormat}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/$DateStringFormat.html}", note=[Accessed: 10-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_$datestringformat, organization={Wolfram Research}, title={$DateStringFormat}, year={2007}, url={https://reference.wolfram.com/language/ref/$DateStringFormat.html}, note=[Accessed: 10-March-2025 ]}

@online{reference.wolfram_2025_$datestringformat, organization={Wolfram Research}, title={$DateStringFormat}, year={2007}, url={https://reference.wolfram.com/language/ref/$DateStringFormat.html}, note=[Accessed: 10-March-2025 ]}