Hello everyone and anyone. I'm new to ASP and this forum. So please 
bear with me. I had someone help me with this script which works 
great. It's purpose is to (1) generate times in time given 
increments and (2) compare these times to data in a particular 
database field (MSSQL). If any of the generated times match the 
database data, the matching generated times are not to display. I 
attempted to tweak it a little to see if I could do this. Here's the 
code: 

<% 
Dim varSatOpen 
Dim varSatClosed 
Dim varSatapptframe 
Dim addTime 
Dim newTime 'what I added 
Dim whatTime 'what I added 

dim dt() : redim dt(-1) 

varSatOpen = ("08:00:00") 
varSatClosed = ("17:00:00") 
varSatapptframe = "30" 
addTime = dateadd("h",cint("0"),varSatOpen) 
response.write addtime 
newTime = ("09:00:00") 'what I've added 
whatTime = dateadd("h",cint("0"),newTime) 'what I've added 

Do While addTime < dateadd("h",cint("0"),varSatclosed) 
addTime = DateAdd("n",cint(varSatapptframe),addTime) 
redim preserve dt(ubound(dt)+1) 
dt(ubound(dt))=addTime 
If whatTime <> dt(ubound(dt)) Then 'what I've added 
response.write replace(string(1," ")," ","<br/>") & dt(ubound
(dt)) 'part of original script
End If 'what I've added 
Loop 
%> 

It works fine until the variable "newTime" is changed to times such 
as "08:00:00", "08:30:00", or "14:30:00". These times continue to 
display when they shouldn't. Any ideas what I've done wrong? 

Again, any and all help is greatly appreciated.








 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to