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
• Save up to 80% on SSL Certificates, RapidSSL Certificate @ $ 11.00/yr.
• help me
• Re: substitute of goto in java???
• Re: store string from text file to vector
• Re: c# .net Exception of type System.StackOverflowException was thrown.
• Re: error: expression must have a constant value
• Re: Script Does Folder Exist – If Not Create It
• $_GET not working
• GET METHOD


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010