2

Anyone know how to format \today to DD-MMM-YYYY format? (Example 01-JAN-2017). Note that it is important that the month is in capital letters.

I've tried some available packages, but so far haven't been able to find a solution that works.

Anyone?

4

The below example fulfill your requirement:

\documentclass{article} 

\makeatletter
\def\today{%
  \two@digits{\the\day}-%
  \ifcase\month\or%
  JAN\or FEB\or MAR\or APR\or MAY\or JUN\or%
  JUL\or AUG\or SEP\or OCT\or NOV\or DEC\fi-%
  \number\year%
}
\makeatother

\begin{document}

\today

\end{document}

Hope this helps.

Output:

12-JUL-2017
|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.