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

I was wondering if there exists such a package, or an option, to write the date in the form 31.1.2012 for example, and then have LaTeX present it as "January 31, 2012". I am actually using LyX and there is an "environment" to put date, However, it puts it in the same manner I am writing it, and for ease of writing I would like to write only numbers.

share|improve this question

How about this?


The datetime package provides the commands \usdate and \formatdate (note that \usdate redefines \today). The macro \innermydate sets up the format in which to input dates. You could say \innermydate1.1.2001 but the syntax with braces is nicer in my opinion, so I borrowed a neat trick from this answer to facilitate it.

share|improve this answer
Thanks. It does work for LaTex, however in LyX it is a problem, since I can't use 'mydate' inside the document (I can write a 'TeX' line inside, but it doesn't output well). Is there a simple solution that will be convenient with LyX? – Stewie Jan 31 '12 at 14:15
I'm afraid I don't know. I can only answer the LaTeX part. I hate LyX! – Ian Thompson Jan 31 '12 at 14:25

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.