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.




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
  • 2
    \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:



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



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


{\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}

| improve this answer | |

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.