Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 digit month 2

Status
Not open for further replies.
Jun 17, 2004
73
US
Is there anything besides System.DateTime.Now.Month,

that will give me a 2 digit month? This only gives me 1 digit. I could write a function easily but being new to C# wanted to make sure .net did already do it for you. Already did that once and kicked myself for an hour.

/cry
/help

[viking2]
LVL 60 ROGUE
 
DateTime.Now.ToString("MM")

And then use this string.

Malay Thakershi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top