Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Date

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Lake Forest, CA
    Posts
    259
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date

    Hi, I need the code for a date in this format...

    Monday July 22nd

    Thanks

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <%
    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)
    %>

    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •