ASP & Date Functions

Discussion in 'ASP General' started by Tim, Jul 9, 2003.

  1. Tim

    Tim Guest

    Hi, I was wondering if there was a function in ASP that
    checks a date to see if it is valid or not. I am aware
    of the IsDate function, but I think its not what I'm
    looking for. I want to run the following date through a
    function and have the function tell me that it is
    invalid: 31-Feb-2003 (cos there is not 31 days in Feb).

    Does anyone know of a function to help me? Or a good way
    to make my own function?

    TIA>
     
    Tim, Jul 9, 2003
    #1
    1. Advertising

  2. Tim

    Ray at Guest

    If you do some string manipulation with your date, you can still use IsDate.
    How are you getting your date? Will you know if it will always be
    Day-Month-Year? If so, you can re-arrange the string and test it. Like,
    IsDate will return true for "Feb 28 2003" (with my US regional settings).
    So, just rearrange your string and use IsDate still.

    Ray at home

    "Tim" <> wrote in message
    news:074801c345d3$e95391d0$...
    > Hi, I was wondering if there was a function in ASP that
    > checks a date to see if it is valid or not. I am aware
    > of the IsDate function, but I think its not what I'm
    > looking for. I want to run the following date through a
    > function and have the function tell me that it is
    > invalid: 31-Feb-2003 (cos there is not 31 days in Feb).
    >
    > Does anyone know of a function to help me? Or a good way
    > to make my own function?
    >
    > TIA>
     
    Ray at, Jul 9, 2003
    #2
    1. Advertising

  3. Tim

    Bob Barrows Guest

    Please don't multipost. I've already replied to this question over at
    ..asp.db. If you feel you must direct your question at multiple
    newsgroups*, then post one single message to the desired groups by
    putting the group names into the To list (aka crosspost)

    *.asp.db is the only group you needed to post this to. Your question
    concerns asp and database code: absolutely no ambiguity.

    Bob
     
    Bob Barrows, Jul 9, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    653
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,380
    Michael Borgwardt
    May 30, 2004
  3. Matt
    Replies:
    2
    Views:
    575
    Pete Becker
    Nov 8, 2003
  4. Matt
    Replies:
    3
    Views:
    757
    Richard Heathfield
    Nov 8, 2003
  5. Matt
    Replies:
    11
    Views:
    429
    Aaron Bertrand [MVP]
    Nov 8, 2003
Loading...

Share This Page