$DateStringFormat

$DateStringFormat

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

Details

  • $DateStringFormat can be set to any format specification supported by DateString.
  • 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)

Use long date format:

Specify your own format:

Generalizations & Extensions  (1)

Include a time zone:

Properties & Relations  (2)

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

Date string formats match date patterns:

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.

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2021_$datestringformat, organization={Wolfram Research}, title={$DateStringFormat}, year={2007}, url={https://reference.wolfram.com/language/ref/$DateStringFormat.html}, note=[Accessed: 09-December-2021 ]}