Results 1 to 3 of 3

Thread: istime

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    is there any function like

    isdate (date)

    but for time ? something like

    istime (time)

    I need to validate a time that was entered ... and ideas ?
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Time is a part of Date data type, so you can easilly use IsDate for that matter.

    Code:
    <%
    Dim strTime
    
    'This is correct time format
    strTime = "12:00PM"
    
    'This format is not correct and will return FALSE if you pass it to IsDate function
    'strTime = "1200"
    
    Response.Write "The time format is " & IsDate(strTime)
    %>

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    ok, so isdate works both on Dates AND times .. :-)

    Cool

    Thanks
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

Posting Permissions

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



Click Here to Expand Forum to Full Width