The best way I've found to get month names in
ASP.net is by using:
- Code: Select all
dim dtfi as System.Globalization.DateTimeFormatInfo = new System.Globalization.DateTimeFormatInfo
monthName = dtfi.getMonthName(monthNo)
So, then if
monthNo was '03', then monthName would be March.
If you're getting the full date from a datasource, and I'm assuming you need to extract it from an an msSQL database, you'd need the query:
- Code: Select all
SELECT DATEPART(mm,monthField) as theMonth
I made some very large assumptions when writing this - but I hope you can get something useful out of it!
Good luck,
Snow