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: FormatDateTime

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FormatDateTime

    How do I format date "mm/dd/yyyy" I am using FormatDateTime(now(), vbShortDate) but it returns 2/19/2003 instead of 02/19/2003
    USA

  • #2
    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
    mystring = Right("00" & Month(Now()),2) & "/" & Right("00" & Day(Now()),2) & "/" & Year(Now())

    Response.Write(mystring)
    Former ASP Forum Moderator - I'm back!

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

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Great, thanks.
    I was kinda hoping there would be something similar to in VB:
    Format(now(), "mm/dd/yyyy")
    USA


  •  

    Posting Permissions

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