Questions tagged [datetime]

{datetime} is about either setting time stamps for your document or handling time data in {diagrams} (e.g., using {pgfplots}). If you are setting the date/time for a title, include the {titles} tag.

is about either setting time stamps for your document or handling time data in . The former typically involves the \date "field" being set to \today for titles, but could also refer to setting time-related PDF properties.

Common packages associated with date formatting include isodate and datetime.

isodateallows for various formatting of language-specific dates. The command \cleanlookdateon removes the ordinal numbering of the day and simply prints it as a numeric:

\documentclass{article}
\usepackage[UKenglish]{babel}% http://ctan.org/pkg/babel
\usepackage[UKenglish]{isodate}% http://ctan.org/pkg/isodate
\begin{document}
Original date format: \today \par
\cleanlookdateon% Remove ordinal day reference
Modified date format: \today
\end{document}

Modified UK date

A popular package for diagrams/plots involving time data is pgfplots.

308 questions
99
votes
3 answers

How can I typeset the date/time at compile time?

For printed drafts of my papers, I would like to add a timestamp on every page with the date/time when the document was last compiled. Is there any LaTeX command that produces the current date/time at compile time? Even better, is there any package…
Juan A. Navarro
  • 62,139
  • 32
  • 140
  • 169
88
votes
3 answers

How to insert 4 digit year that shows up in \today?

Using the LaTeX command \today, I can insert the current date. Is there any way to insert the current year with a simple command? All I want is the simple 4 digit year that shows up in \today.
Amandasaurus
  • 2,501
  • 3
  • 14
  • 9
56
votes
4 answers

Month/Year Format in Latex

This should be a easy question, but I didn't find answer from googling. The date format I wan is: Month(letter), Year(numerical). For example, I want: November, 2014. Of course, I can manually achieve this requirement. But I think LaTeX can do…
Daryl
  • 977
43
votes
4 answers

How to implement a \tomorrow in latex

I was asked how to implement a \tomorrow macro in TeX/LaTeX. While I could come up with a reasonably good solution, working for one document class, I don't see how that could be achieved in a document class agnostic way. I found advdate, but even…
Max
  • 5,702
35
votes
2 answers

\today month as text

I have this code: \documentclass{article} \usepackage[a5paper]{geometry} \usepackage[ddmmyyyy]{datetime} \renewcommand{\dateseparator}{.} \begin{document} \today \end{document} Prints: How can I make it print this: 07 May, 2013
user4035
  • 5,035
  • 6
  • 40
  • 57
26
votes
3 answers

Referring to dates other than \today

Is there a package that allows one to work with dates in the following way: just as \date shows today's date, I would like to have a command that dates the document 7 days from today. Also, since I would like to use this as a template, I do not want…
user1227
  • 485
19
votes
2 answers

Write date, time, and time zone

Background Looking to include the current date, time, and timezone within a PDF. Problem The datetime package does not provide a macro for the current timezone. Question How would you write a macro in LaTeX to create a date such as: Sun Jan 09…
Dave Jarvis
  • 11,809
16
votes
3 answers

How do I insert yesterdays date instead of today?

I usually generate a report for the previous day (as I imagine isn't all too uncommon) and so I'd like to date it with yesterday's date instead of today. Currently I have: \title{foo} \date{\today} But I can't seem to find a \yesterday or anything…
14
votes
1 answer

How to get automatic date generated in a LaTeX file?

I tried using the datetime package, but it doesn't display the date in the format I want. What I would like is something like August 30, 2015. How do I do this?
14
votes
2 answers

Is there a command to get the name of the current day of the week?

I'm currently using \date{\today} to put the current date at the top of my document. However, I would like the date to read "Friday, May 13, 2011" instead of just "May 13, 2011". Is there a command to get the name of the current day of the week or…
Brandon
  • 1,941
13
votes
3 answers

How do I split a date?

I need to split a date (German format) and store its single elements in variables (to use it in TikZ-calendar). A German formatted date looks like 23.01.2012 (Day.Month.Year), so I could use the dots as a separation marker. Unfortunately I have no…
schmendrich
  • 3,908
11
votes
3 answers

How do I print out dates in YYYY-MMM-DD format?

Is there an easy way to print out dates in the format of 2014-Jan-15. Being in North America, Canada not the USA, there are too many date formats in use. To remove any chance of confusion the client would like to use YYYY-MMM-DD. I can do my…
11
votes
2 answers

\the\year in Roman and \the\month in text

I would like to get the month in text e.g., June and the year in Roman, e.g. MMXIV when I call \the\month and \the\year I also would like to avoid using any external package (I found some related questions, but all seem to be based on the datetime…
Mario S. E.
  • 18,609
11
votes
5 answers

Date of file creation

When I write my notes, (I actually use lyx but that does not matter) I like to add a header with the name of file and the date the file was compiled. This I do using fancyhdr package and…
lcv
  • 275
10
votes
1 answer

Save a time for later use

In the datetime package, we have the command \newdate which allows you to save a date for later use. In the same line, without thinking much, I tried to use: \newtime{examstart}{09}{00} and was rather surprised to find that this command does not…
Masroor
  • 17,842
1
2 3 4 5