Date Comparsion

Results 1 to 2 of 2

Thread: Date Comparsion

  1. #1
    Join Date
    Dec 1969

    Default Date Comparsion

    I have problem comparing for in-between dates. For example I have a valid date of starting 15/6/2000 and ending 7/8/2000. And my input date is starting 1/7/2000 and ending 6/7/2000. What can i do to know that my range of input are within the valid date?<BR><BR>Please enlighten and thank you

  2. #2
    Carey Walker Guest

    Default RE: Date Comparsion

    All you need to do is assign the date to a variable and then compare the variable to another variable.<BR>&#060;%<BR>date1 = "15/6/2000"<BR>date2 = "7/8/2000"<BR>date3 = "1/7/2000"<BR>date4 = "6/7/2000"<BR><BR>If date3 &#062; date1 Then<BR><BR> If date4 &#060; date2 Then<BR> response.write "Dates are within exceptable range"<BR><BR> Else<BR><BR> response.write "2nd date is out of acceptable range"<BR> End If<BR><BR>Else<BR><BR> response.write "1st date is out of acceptable range"<BR><BR>End If<BR>%&#062;

Posting Permissions

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