Hi!
I think in
ASP VBScript there is a
MonthName function which you can use. First you need to cast the date string into a
Date data type, then use the
Month function to return the month number from that string, then use
MonthName to return the name for that month. I think if you supply
True as the second parameter, it will abbreviate the month name for you. So for example:
- Code: Select all
Function GetMonthName(value)
Dim dteValue
Dim intMonth
Dim strMonth
dteValue = CDate(value)
intMonth = Month(dteValue)
strMtonh = MonthName(intMonth, True)
GetMonthName = strMonth
End Function
You can encur all sorts of problems with dates though, because
ASP can't handle different variable types, and so effectively treats every variable like a String. You might find that it gets confused between 10/03/2006 (October 3rd in US format) and 03/10/2006 (March 10th in US format), but it all depends on how you're storing your dates in the first place.
Hope that helps. Give me a shout if you need any more.