Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Which date is greater?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,183
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Which date is greater?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Which date is greater? - 6/18/2001 4:22:30 AM   
  varcesi

 

Posts: 12
Score: 0
Joined: 5/23/2001
From: Italy
Status: offline
I am having a problem figuring out how to get this to work.
date1 = 1/1/90
dateMin = 4/3/90
dateMax = 2/16/01

if (date1 < dateMin) then
Error 1
elseif (date1 > dateMax) then
Error 2
end if

This should be performing Error 1, but it is performing Error
2. Does anyone have any suggestions as to what the problem
might be?
 
 
Post #: 1
 
 Re: Which date is greater? - 6/18/2001 4:23:45 AM   
  mid

 

Posts: 16
Score: 0
Joined: 6/4/2001
From: USA
Status: offline
At aspsamples.com there is section where you can paste ASP
code into a textarea, then run it. I did this with the code above,
altering it slightly:
<%@ language=vbscript%>
<%
date1 = 1/1/90
dateMin = 4/3/90
dateMax = 2/16/01

if (date1 < dateMin) then
response.write "less"
elseif (date1 > dateMax) then
response.write "more"
end if
%>
This code executed propery, so we know the logic is correct.
For fun I would make your years 4 digits.
Post back if you find a solution.

(in reply to varcesi)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Which date is greater? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts