Validate Date

Results 1 to 3 of 3

Thread: Validate Date

  1. #1
    Join Date
    Dec 1969

    Default Validate Date

    I am trying to validate a date field as mm/dd/yyyy using VBScript. I can not use Formatdatetime because it will not return yyyy without day of week. I need exactly mm/dd/yyyy.<BR>I tried using SPLIT but if the user leaves off year I get an error accessing SDate(3).<BR>Thanks,<BR>Ray

  2. #2
    Join Date
    Dec 1969

    Default RE: Validate Date

    Why can&#039;t you use Split()?<BR><BR>Surely you just test the UBound() of the resultant array. If it&#039;s not equal to 2 then they&#039;ve put in an invalid date.<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default First use isdate

    that will check if it is a date...then you can check the format...<BR><BR>

Posting Permissions

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