codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  another complex sql this time its a date/time  sanderman at 08:16 on Saturday, August 13, 2005
 

Hi coders,

thanks for the help on my last topic!

now i have another one:

i need to show records that are less than 24 hours in database.

so far i have this:

<% session("tijdnu") = DateAdd("h",-24,Now()) %>

to get the time 24 hours ago

my where statement is:

"SELECT * FROM rented WHERE time < #" + Replace(seen__MMColParam, "'", "''") + "# AND renter = '" + Replace(seen__name, "'", "''") + "'

but it does not show the records the time field is a date/time field "1-12-1900 0:0:00"

the syntax for the time 24 hours ago is correct when i do a response.write is stats the correct time

i am pulling my hair, so i hope someone can shed some light
on this.....

thank, greetzzzz

Sander Kerstens


  Re: another complex sql this time its a date/time  javabits at 02:57 on Sunday, August 14, 2005
 

"SELECT * FROM rented WHERE time < #"

should probably be

"SELECT * FROM rented WHERE time > #"

semper fi...


  Re: another complex sql this time its a date/time  sanderman at 09:58 on Sunday, August 14, 2005
 

mmmm i think you are right, it seems to work now

stupid me.....thanks again

this forum is the best

greetzzz from the netherlands....








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Pangrams
•  Re: algorithm problem
•  Writing Macro for Excel
•  I need a universal form validator linked to 2 forms by an include file
•  How to work with socks proxies on PERL?
•  FtpClient.list() - File Names only instead of all details like Size, Date Created etc…
•  Re: codes in java in how to send and receive messages via bluetooth
•  Help with script for a script
•  Re: need help


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006