Monday, January 3, 2011

Date Time You did it wrong.

This is a priceless gem I found today
TranslateText("MonthName"+(DateTime.Now.Month-2).ToString("D2"),"")
It will even work for 10 months out of the year.
It should be 
TranslateText("MonthName"+(DateTime.Now.AddMonths(-2).Month).ToString("D2")
Which works for 12 months out of the year.