|
 |
access_asp thread: asp quary dont work need assistanse
Message #1 by "Thore Skjervum" <thore@n...> on Mon, 10 Jun 2002 14:12:55
|
|
i cant extract date's in asp what is the command, iv'e tried so far varius
of combinations like this sentense for example.
where date stands i want a variable solution, can anyone help me`?
rs.Open "SELECT * FROM stevnedetaljer where datofra <" & 01/01/2002 ",
conn, 3, 3
Message #2 by bayou_ranch@m... on Mon, 10 Jun 2002 14:46:41
|
|
> i cant extract date's in asp what is the command, iv'e tried so far
varius
o> f combinations like this sentense for example.
w> here date stands i want a variable solution, can anyone help me`?
> rs.Open "SELECT * FROM stevnedetaljer where datofra <" & 01/01/2002 ",
c> onn, 3, 3
Try this:
rs.Open "SELECT * FROM stevnedetaljer where datofra < #01/01/2002# ",
c> onn, 3, 3
I am not 100 percent sure this is correct but it is easy to try.
Good Luck
Message #3 by "Thore Skjervum" <thore@n...> on Mon, 10 Jun 2002 14:54:55
|
|
> Try this:
> rs.Open "SELECT * FROM stevnedetaljer where datofra < #01/01/2002# ",
c> > onn, 3, 3
> I am not 100 percent sure this is correct but it is easy to try.
> Good Luck
i have tryed that wariant but i get this error
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
near '#'.
/web njff/raportertestevner.asp, line 12
but tnx for help ;O)
Message #4 by "Thore Skjervum" <thore@n...> on Mon, 10 Jun 2002 15:11:23
|
|
got it to work now .. kinda .. i used the getdate() instead of date().
i got one question more though ..
how can i filter the quary too only display the date wich has current date
or one of the 14 previous dates?
Message #5 by Guy Counahan <gcounahan@m...> on Mon, 10 Jun 2002 15:10:06 +0100
|
|
SELECT * FROM table WHERE ((([table]![date])>Date()-14)) ORDER BY date DESC
Works for me.
Guy
-----Original Message-----
From: Thore Skjervum [mailto:thore@n...]
Sent: 10 June 2002 16:11
To: Access ASP
Subject: [access_asp] Re: asp quary dont work need assistanse
got it to work now .. kinda .. i used the getdate() instead of date().
i got one question more though ..
how can i filter the quary too only display the date wich has current date
or one of the 14 previous dates?
Message #6 by "Thore Skjervum" <thore@n...> on Wed, 12 Jun 2002 12:00:51
|
|
> SELECT * FROM table WHERE ((([table]![date])>Date()-14)) ORDER BY date
DESC
Works for me.
Guy
------------------------
thank you for the reply, i'll try it ;O)
|
|
 |