Is there a way to show the first 9 days of the month as 01, 02, 03 etc. \the\day prints 1, 2, 3 etc.

  • I think scrdate can do that with ease. Can you show us some code so we know how you want to use the date (and where). – Johannes_B Dec 1 '14 at 8:40
  • Using \the\day will always use 1, 2 and so on, because \the is a primitive command that can't be modified. In what situation do you want this “two digit form” to be used? – egreg Dec 1 '14 at 9:03
  \ifnum\day<10 0\fi
  • David, I think it should be \ifnum\day<10 0\the\day\fi – Reza Dec 1 '14 at 12:12
  • @Reza that would make no output if the day is over 10. The code shown always uses 2 digits for the day. – David Carlisle Dec 1 '14 at 12:33
  • David, you are right. – Reza Dec 1 '14 at 12:44

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.