{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.

learn more… | top users | synonyms

56
votes
2answers
61k views

Omitting the date when using \maketitle

I'm using the \author and \title commands to produce a title with \maketitle. I also know that there is a \date command to specify the date of my work. However, if I omit \date, \maketitle will ...
39
votes
2answers
14k views

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 ...
34
votes
2answers
2k views

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 ...
29
votes
3answers
2k views

Date format: YYYY-MM-DD

Currently I put the date in my document using: \date{\today} How do I display the date in the YYYY-MM-DD format?
28
votes
3answers
18k views

Date format in LaTeX

I use UKenglish package. And the \date command produces the date like so: 10th October 2011. But I want just 10 October 2011; th should be omitted. How can this be done? I tried using datetime ...
28
votes
3answers
6k views

Is there a way to add a timer to a Beamer presentation?

I have seen presentations in Power Point which contain a timer. Can this be done in Beamer using a simple command, or maybe a package? If not a timer, is it possible to at least get a clock on your ...
26
votes
3answers
7k views

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.
24
votes
2answers
1k views

Date calculations

I'm building a LaTeX document that helps me to formulate quotations for my customers. Since I decided to offer monthly recurring payments I'd like to have payment dates calculated automatically ...
23
votes
3answers
6k views

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 ...
22
votes
4answers
548 views

Day of the year

I'm using the day of the year a lot in my documents and I wonder if I can have LaTex calculating it for me? Example: 2013178 where 2013 is (surprise) the current year (which I know could be achieved ...
19
votes
1answer
2k views

Disable month in biblatex bibliography?

Currently my bibliography items are printed like this: R. B. Griffiths, Nonanalytic Behavior Above the Critical Point in a Random Ising Ferromagnet, Physical Review Letters 23 (July 1969), pp. ...
18
votes
2answers
2k views

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 ...
18
votes
2answers
780 views

Automated age calculation

How can I calculate my age at compile-time in LaTeX? Something like: I'm \myage{day}{month}{year} years old. would be most awesome.
17
votes
3answers
1k views

Range of Dates (1999-01 — 2012-12)?

How to typeset range expressed with dash of two ISO8601 dates ? 2010-01--2012-03 or 2010-01---2012-03 or another option ?
17
votes
2answers
658 views

Handling different time zones

I'm looking for a way to handle date/times with different time zones. For example in svn-multi and filemod a date and time with a timezone is returned. I like to be able to compare times in different ...
15
votes
2answers
585 views

What is the XeTeX equivalent of \pdfcreationdate?

I need the time to 1-second resolution. datetime uses \pdfcreationdate for this, but only under pdf(La)TeX. As a result under XeLaTeX, this: \usepackage{datetime} ... ...
14
votes
3answers
464 views

How to make time-dependent code?

I would like to create a command \ifafter{year}{month}{day}{yes}{no} so that if the current date is after year/month/day, the command would produce yes, and otherwise produce no. I came up with a ...
13
votes
4answers
4k views

Having a LaTeX PDF display the date the document was printed, not compiled…

I have been looking around for quite some time trying to find a way for a PDF (created using XeTeX) to adjust the date accordingly by the date it was printed - not compiled. I am familiar with \date, ...
13
votes
4answers
606 views

UNIX timestamp (= seconds since 1/1/1970) in document?

I would like to include a so-called UNIX timestamp in my document. All technicalities aside, it's basically the number of seconds since 1/1/1970 0:00 UTC aka "the epoch". (At the time of me writing ...
12
votes
3answers
652 views

Macro for week number

Is there a macro or package to calculate the ISO week number or alternative can someone help me with one?
12
votes
2answers
1k views

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 ...
12
votes
2answers
147 views

force \today to use EST

I'm using ShareLaTeX, which, for those who don't know, is a website that compiles LaTeX on a server. The issue is that when I type \today, it gives my the date of the server. So, for example, right ...
11
votes
3answers
798 views

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 ...
11
votes
1answer
766 views

Difference between two dates

Is there a macro that calculates the year and months from a given start date and the current date. So let's say I have 05/02/2010 (the start date), then it should do the following: Today - ...
10
votes
3answers
282 views

Change \the\year

Is it possible to make LaTeX believe that the current year is 2012, so that \the\year prints 2012? \documentclass{article} \begin{document} % What to do so that the following prints 2012? ...
10
votes
2answers
301 views

Advancing \today by x days [duplicate]

New LaTex user here, hoping you can help me. I am drafting a letter, the submission date of which I do not yet know. For this reason I am dating it using \today. However, in the text of the letter, ...
10
votes
1answer
1k views

How to write date and time in footer

I am writing a report in which i need to write date and time in the footer. How do I write date and time in footer? like Jan 8, 2013 5:45 PM
9
votes
2answers
661 views

Query regarding usage of \date

Hi I am using Texmaker to create some documents. When I use \date{text} the text being any date, and then run the .tex file I don't see the date in the PDF file. It's just blank. Not sure why. Is ...
9
votes
2answers
5k views

\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 ...
9
votes
3answers
341 views

Possible ways to format a specific century in LaTeX?

I'm writing I little bit of history in my report and I wonder which are the possible ways to format a century in LaTeX (e.g XX century) and in typography which is the most used and accepted. This is ...
9
votes
1answer
112 views

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 ...
9
votes
1answer
370 views

Require a certain (or later) version of a package?

Is there a way to enforce that a certain version, or a later version, of a package is loaded when building the document? I've found that compiling a document on another platform, where the package ...
9
votes
4answers
1k views

Formatting dates “day month year” with biblatex

What is the correct way to have “day month year” formatting in biblatex? Given this document: \documentclass{article} \usepackage[backend=biber,dateabbrev=false]{biblatex} ...
9
votes
1answer
148 views

Does \today use the system clock or take time off of a time server?

I would like to know whether \today gets time off of a time server or the system clock, and when. Does it get the time when compiling? Upon viewing the document created?
9
votes
1answer
408 views

Adding several labels (year/month) to a graph in pgfplots

I would like to add several labels to a plot in pgfplots: one label for the month and one for the year, just like in this graph: I tried to use the extra tick label, but I don't know how it is ...
9
votes
1answer
283 views

Time of the day or time period using the package siunitx

I would like to display the time of the day like 18h30 or 18h30m with siunitx. Is there a proper way to display time and time intervals? I have read some discussions on the Mailing-List, but it seems ...
9
votes
1answer
109 views

Make an index of historical time periods

I'm writing my thesis & I want to make an index with centuries, years, month, day, event & historical periods. So I try to build some commands, but unsatisfactory, I'm looking for your help. ...
8
votes
3answers
439 views

Determine last day of given month

I want to determine how many days there are in a particular month. Using the datenumber package, I thought I could simply set the date to the 1st of the next month and then back up one day would be ...
8
votes
2answers
233 views

Getting rid of numbers

How would I get rid of the date, and the numbers 1 and 2? My latex code is below. I cant post images as Im a new user, sorry! \documentclass[10pt]{article} \begin{document} \title{Banana Cake} ...
8
votes
2answers
640 views

Date format in text and address block

In my generated letter I use \formatdate{\MDay}{\MMonth}{\MYear}. In header I specific \usepackage[nodayofweek,level]{datetime}. I have got then date like 10th May, 2012, but I would like only 10th ...
8
votes
3answers
37k views

Insert date set with \date command

I searched all morning to do this. I want to insert in my custom title page the date, author, title set with the following commands \date{The date} \author{Me \and Other} \title{the document title} ...
8
votes
1answer
354 views

How can I make a graph with irregular time/date intervals on the x-axis?

I have a data set that has values for a set of dates, but these dates don't have a regular interval (i.e. 1 Feb., 3 Feb., 15 Feb., 5 March) . So my question is: is there a package or other method to ...
8
votes
1answer
467 views

pgfplots data time format

I have this type of data set: Time State 22:54:14.716 5 22:54:14.716 5 22:54:14.716 5 22:54:14.716 5 22:54:14.729 4 22:54:14.919 1 22:54:14.919 1 22:54:15.128 5 I ...
8
votes
1answer
369 views

Getting origyear to work in biblatex

I have just switched from natbib to biblatex, because I wanted to add translator entries to my bibliography. I am now trying to get origyear to work. Before my entry was like this: ...
7
votes
2answers
84 views

Using calc and \year to get the years from a start date automatically in text?

I would like to say, "I have played piano for 23 years" -- but this document will have to be changed every year so I remember to make it 23, then 24, then 25. Is there a way to do something like: I ...
7
votes
5answers
1k views

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 ...
7
votes
2answers
233 views

Extract year from parameter containing date [duplicate]

Possible Duplicate: How do I split a date? Does anyone know how to extract year from date in parameter of own macro? Namely, \themacro#1{...} where #1 contain either date already in ...
7
votes
1answer
186 views

Is it possible to parse a date string in LaTeX to convert it to a different date format?

I’m using svn-multi to include the date of the most recent Subversion commit of my documents. However, the string has the format 2013-10-13 11:05:51 +0200 (Sun, 13 Oct 2013). Is it possible to convert ...
7
votes
1answer
207 views

Are the datetime package and the memoir class known to conflict?

Using the \formatdate macro from the datetime package within a \date definition seems to break when using the memoir class. Is this just something strange that I'm doing because it seems reasonable. ...
7
votes
1answer
500 views

Changing The Date Location On A Letter

I'm using the document class scrlttr2 to make a cover letter, but since it's a business letter the date needs to be left-justified and above the address. By using the work-around here I was able to ...