System.DateTime.Now.Month.ToString only showing one number for single number months

dba123
dba123 used Ask the Experts™
on
I want System.DateTime.Now.Month.ToString to show 03 for March, not 3
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
How about this

System.DateTime.Now.ToString("MM")

I tried it and it works for me

HTH
~BC

Author

Commented:
Haha, thanks Pocky!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial