9

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?

  • 1
    \today{} is one method – Leucippus Aug 30 '15 at 17:39
12

You can use the datetime2 package:

\documentclass[english]{article}
\usepackage{babel}
\usepackage[useregional]{datetime2}

\begin{document}

\today

\end{document}

enter image description here

With datetime:

\documentclass{article}
\usepackage{datetime}

\newdateformat{monthdayyeardate}{%
  \monthname[\THEMONTH]~\THEDAY, \THEYEAR}

\begin{document}

\monthdayyeardate\today

\end{document}
  • Do you know how I could push this to the right side of the page? I tried using \hfill, but it doesn't do anything. Using \begin{flushright} causes an error for some reason. – AlanH Aug 30 '15 at 17:40
  • 3
    @AlanH Under normal circumstances \hfill should be enough; if it's not working for you, we need the code you are using. Please consider then opening a fresh new question. – Gonzalo Medina Aug 30 '15 at 17:43
  • You could use datetime2 but you might be happier not doing so :(. – cfr Aug 31 '15 at 0:57
  • @cfr Why is this so? – Gonzalo Medina Aug 31 '15 at 1:42
  • I wish I'd never tried to update. I cannot make it work. I cannot even, really, figure out how it is supposed to work or what I am supposed to do with it. I'm sure it is fine for English. I'm just using datetime with a fixed language file. That works fine and was straightforward to do. The original file for Welsh has Breton mixed in with it. So does the datetime2 version so I tried to correct it but I can't. Polyglossia is corrected. Babel is not but would be easy. datetime is easy but cannot be changed (except locally). datetime2... I'm sure it is not impossible, but it sure seems so. – cfr Aug 31 '15 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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