Date Validation using VBScript

Results 1 to 2 of 2

Thread: Date Validation using VBScript

  1. #1
    Join Date
    Dec 1969

    Default Date Validation using VBScript

    Hi everyone, I am having a problem in client side date validation. I have two date fields, upon submitting my form, I want to check if the second date is later than the first date. All this checking are done by vbscript. My problem is that the checking is based on the client side date format. How to overcome this??

  2. #2
    Join Date
    Dec 1969

    Default Try this

    Dim aDate, bDate<BR>aDate = CDate("1-Jun-2001")<BR>bDate = CDate("29-May-2001")<BR><BR>If DateDiff("d", aDate, bDate) &#060; 0 Then<BR> Response.Write "bDate was prior to aDate"<BR>Else<BR> Response.Write "bDate was after aDate"<BR>End If

Posting Permissions

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