# mysterious 0 when using \formatdate

I'm writing my resume using a template and I wanted my some of the dates to be presented as e.g. 14th October I got it displayed like that using.

\usepackage[UKenglish,nodayofweek]{datetime}


and

\formatdate{14}{10}


but it prints the date as "14th October, 0". I'm guessing it's printing an empty year but I'm not sure how to fix it. I'm also going to need to print some dates as just "month + Year" is there a way to print that as well in the same document easily or should I just type it out?

• Welcome to TeX.SX! A year is required in the arguments to \formatdate: \formatdate{<day>}{<month>}{<year>}. Can you make a minimal example that shows the mysterious 0? – egreg Oct 20 '13 at 22:16
• \formatdate takes three arguments day month year \formatdate{14}{10}{2013} – David Carlisle Oct 20 '13 at 22:18

You can define your own formats day + month or month + year with \newdateformatand use with \today, \SetDate(of advdate package) or a \formatdate:

\documentclass{article}
\usepackage[UKenglish,nodayofweek]{datetime}

\newdateformat{DM}{\ordinal{DAY} \monthname[\THEMONTH]}
\newdateformat{MY}{\monthname[\THEMONTH], \THEYEAR}

\begin{document}

{\Large\verb|\today|}\bigskip

{\tt datetime} default  \dotfill  \today

\LaTeX\ default (\verb|\usdate|) \dotfill \usdate\today

Day and month (\verb|\DM|) \dotfill \DM\today

Month and year (\verb|\MY|) \dotfill \MY\today

\bigskip{\Large\verb|\formatdate{28}{11}{2014}|}\bigskip

{\tt datetime} default \dotfill \longdate\formatdate{28}{11}{2014}

\LaTeX{} default (\verb|\usdate|) \dotfill \usdate\formatdate{28}{11}{2014}

Day and month (\verb|\DM|) \dotfill \DM\formatdate{28}{11}{2014}

Month and year (\verb|\MY|) \dotfill \MY\formatdate{28}{11}{2014}

\end{document}