I'm sure this must be simpler as an array rather than with eleven ElseIf statements, but don't have a clue how to do it. I've never done an array before. It works fine as it is, but I would like to learn. Can someone help? This is using an Access database, by the way. Thanks!
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)
Code:
<%
If DoVar(rs("Date")) = "&nbsp;" then
FullDate = ("There was no date specified")
Else
Dim dDate
dDate = DoVar(rs("Date"))
Year(dDate)& Day(dDate) & Month(dDate)
If Month(dDate) = "1" then
MonthVar = "January"
ElseIf Month(dDate) = "2" then
MonthVar = "February"
ElseIf Month(dDate) = "3" then
MonthVar = "March"
ElseIf Month(dDate) = "4" then
MonthVar = "April"
ElseIf Month(dDate) = "5" then
MonthVar = "May"
ElseIf Month(dDate) = "6" then
MonthVar = "June"
ElseIf Month(dDate) = "7" then
MonthVar = "July"
ElseIf Month(dDate) = "8" then
MonthVar = "August"
ElseIf Month(dDate) = "9" then
MonthVar = "September"
ElseIf Month(dDate) = "10" then
MonthVar = "October"
ElseIf Month(dDate) = "11" then
MonthVar = "November"
ElseIf Month(dDate) = "12" then
MonthVar = "December"
End if
FullDate = ((MonthVar) & " " & Day(dDate) & ", "& Year(dDate))
End if
%>
Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)