Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Time in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-04, 06:23
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
Time in ASP

Assume that all of time was kept in variable which is array like this. Note that tiorder is time

tiorder2(t2)=rst5("tiorder")


sql="select top 1 * from ("&namecompany2(i2)&") where price <= "&limitprice2(j2)&" and ti > #&tiorder2(t2)&#"

The problem is ti > #&tiorder2(t2)&#" it doesn't work



Note that tiorder2(t2) keep time
Reply With Quote
  #2 (permalink)  
Old 09-26-04, 20:45
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
I think you are trying for something like....
Code:
ti > "#" & tiorder2(t2) & "#"
Actually you are probabyl better to go with a CDate idea like...
Code:
CDate(ti) > CDate(tiorder2(t2))
At least then you know you are comparing two dates...

Last edited by rokslide : 09-27-04 at 01:22. Reason: Rethink.....
Reply With Quote
  #3 (permalink)  
Old 09-27-04, 06:43
gop373 gop373 is offline
Registered User
 
Join Date: Aug 2004
Posts: 77
The type of time that I use in column ti is date/time hh:nn:ssAM/PM
Id ti
1 9:00:01AM
2 10:00:01AM
3 10:12:45AM
4 10:30:01AM
Reply With Quote
  #4 (permalink)  
Old 09-27-04, 20:06
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
errgghhh.... that's not good.... okie, something that will work.... (although there may be better ways, I haven't played much with time values)

reformat your time to 24 hour using something like...
Code:
24Hour(ti) > 24Hour(tiorder2(t2)) Function 24Hour (myTime) arrTime = split("9:00:01AM",":") AMPM = mid(arrTime(2),3) myHour = arrTime(0) myMinute = arrTime(1) mySecond = left(arrTime(2)) if AMPM="PM then myHour = myHour +12 24hour = myHour & myMinute & mySecond end function
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On