View Single Post
Old August 19th, 2008, 03:07 PM
Old Pedant Old Pedant is offline
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

If you are getting the month name via a SQL query in the first place, maybe it would be better to change the original query.

Converting a datetime value to a string and then back to a datetime and then finally to an integer is expensive. Not TOO expensive, but still...

If you showed us the original query, we might be able to make this more efficient.