times problem with asp/acess mdb

times problem with asp/acess mdb

Post by gary guyle » Sun, 14 Oct 2001 04:28:05



hi there,
i'm trying to create times in 20 min intervals on an asp page and then
check them against a date/time field(vbshortTime) in an access mdb. if the
time doesnt match as it loops through the recordset the time is printed.
Problem is it works with some times but not with others..is this a delimiter
problem with the created times or something...heres a snippit of code where
i think the problem could be:

dim X
X="7:00"
X=DateAdd("n", 20, X)
if X = RS.Fields("time") then...etc....etc

any help appreciated
Gary

 
 
 

times problem with asp/acess mdb

Post by Tore » Sun, 14 Oct 2001 13:20:13


getting a little trigger happy?  (4 posts in 40 minutes...)

Your problem is probably that you have seconds or milliseconds in the storde
datetime values that do not match the time you specify (which is minutes
only).

HTH,
Tore.


Quote:> hi there,
> i'm trying to create times in 20 min intervals on an asp page and then
> check them against a date/time field(vbshortTime) in an access mdb. if the
> time doesnt match as it loops through the recordset the time is printed.
> Problem is it works with some times but not with others..is this a
delimiter
> problem with the created times or something...heres a snippit of code
where
> i think the problem could be:

> dim X
> X="7:00"
> X=DateAdd("n", 20, X)
> if X = RS.Fields("time") then...etc....etc

> any help appreciated
> Gary


 
 
 

times problem with asp/acess mdb

Post by gary guyle » Sun, 14 Oct 2001 23:39:03


yeah sorry all for multi-posts but i was having isp probs at my end...
Anyway cheers for advice but how do i correct the problem?

>getting a little trigger happy?  (4 posts in 40 minutes...)

>Your problem is probably that you have seconds or milliseconds in the
storde
>datetime values that do not match the time you specify (which is minutes
>only).

>HTH,
>Tore.



>> hi there,
>> i'm trying to create times in 20 min intervals on an asp page and then
>> check them against a date/time field(vbshortTime) in an access mdb. if
the
>> time doesnt match as it loops through the recordset the time is printed.
>> Problem is it works with some times but not with others..is this a
>delimiter
>> problem with the created times or something...heres a snippit of code
>where
>> i think the problem could be:

>> dim X
>> X="7:00"
>> X=DateAdd("n", 20, X)
>> if X = RS.Fields("time") then...etc....etc

>> any help appreciated
>> Gary

 
 
 

times problem with asp/acess mdb

Post by Tore » Mon, 15 Oct 2001 12:36:21


Check againts a time range rather than a specific time.

HTH,
Tore.


> yeah sorry all for multi-posts but i was having isp probs at my end...
> Anyway cheers for advice but how do i correct the problem?

> >getting a little trigger happy?  (4 posts in 40 minutes...)

> >Your problem is probably that you have seconds or milliseconds in the
> storde
> >datetime values that do not match the time you specify (which is minutes
> >only).

> >HTH,
> >Tore.



> >> hi there,
> >> i'm trying to create times in 20 min intervals on an asp page and then
> >> check them against a date/time field(vbshortTime) in an access mdb. if
> the
> >> time doesnt match as it loops through the recordset the time is
printed.
> >> Problem is it works with some times but not with others..is this a
> >delimiter
> >> problem with the created times or something...heres a snippit of code
> >where
> >> i think the problem could be:

> >> dim X
> >> X="7:00"
> >> X=DateAdd("n", 20, X)
> >> if X = RS.Fields("time") then...etc....etc

> >> any help appreciated
> >> Gary