Results 1 to 5 of 5

Thread: Date in VB

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    208

    Date in VB

    I have a text box which accepts date.
    How do I check whether the date entered by the user
    is within the specified range

    i.e. if the user enters (dd/mm/yy) as "30/02/02"
    then this is incorrect as date in feb is 28

    So how do I check !!!!!!

    Please somebody advise

    thnks

    A student

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    You mean like make sure the date is valid?

    VB Code:
    1. IsDate("30/02/02")

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    208
    How do u use Isdate function

    I dont want to break up the nos and check Because how will i know
    whether it is a leap year or whether there are 30 days or 31 days etc etc
    Is there another way other than breaking up !!!!!!

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    I believe ISDATE will pick it up... but you could alwayys test to be sure. (2000 was a leap year)
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  5. #5
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by Micky
    How do u use Isdate function
    Just like I showed you. Just pass the date in question into IsDate() and it will return True if its a valid date, false otherwise.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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