Currently I put the date in my document using: \date{\today}
How do I display the date in the YYYY-MM-DD
format?
datetimeformatting
Currently I put the date in my document using: \date{\today}
How do I display the date in the YYYY-MM-DD
format?
Best Answer
edit: As noted by @Sean Allred,
datetime
has been superseded bydatetime2
.Using the package datetime with the option
yyyymmdd
asyou just change the value of
\dateseparator
to replace the default/
by-
(or--
if you want).Also as noted by @Vincent, you can define your own date format.