TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I define and use the date format "1 Jan 2012 7.03am"?

share|improve this question
up vote 5 down vote accepted

I'm answering my own question here, in the hope that other people might find this information useful. The answer is to use

\newdateformat{mydate}{\THEDAY{ }\shortmonthname{ }\THEYEAR{ }\currenttime}

and then


where you want to insert the date and time.

share|improve this answer
It would be better if you expanded the answer to cover also other date formats (for example in different languages). – egreg Jan 21 '12 at 9:44
Unfortunately a bug in ampmtime makes 12.22pm come up as "12.22 noon"! – Harry Macpherson Jan 21 '12 at 12:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.