PDA

View Full Version : Date


The Wizzard
07-23-2002, 06:39 AM
Hi, I need the code for a date in this format...

Monday July 22nd

Thanks

allida77
07-23-2002, 01:38 PM
http://www.w3schools.com/vbscript/vbscript_ref_functions.asp#date

whammy
07-24-2002, 12:03 AM
<%
Dim strDateExt, d, strEnglishDate
strDateExt = "th"
d = Date()
If Day(d) = 1 OR Day(d) = 21 OR Day(d) = 31 Then
strDateExt = "st"
ElseIf Day(d) = 2 OR Day(d) = 22 Then
strDateExt = "nd"
ElseIf Day(d) = 3 OR Day(d) = 23 Then
strDateExt = "rd"
End If
strEnglishDate = WeekDayName(WeekDay(d)) & ", " & MonthName(Month(d)) & " " & Day(d) & strDateExt & ", " & Year(d)

Response.Write(strEnglishDate)
%>

:)