Database Results Wizard - records with todays date

  • Thread starter Thread starter Yeltum
  • Start date Start date
Y

Yeltum

Hi,

I would like to display records from my database, that
have the value of todays date in the FromDate field. I've
tried as a query:

SELECT * FROM Events WHERE (FromDate = 'SYSDATE') ORDER
BY FromDate ASC

and

SELECT * FROM Events WHERE (FromDate = 'now()') ORDER BY
FromDate ASC

but neither work, I get the error:
Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver]
Data type mismatch in criteria expression.
Number: -2147217913 (0x80040E07)
Source: Microsoft OLE DB Provider for ODBC Drivers

Could anyone help? Is their a web-site with query
statement examples?

Many Thanks
 
To be honest - I have no idea BUT I'll start to
put "colon" in like '::SYSDATE::'. I wonder if it helps.
Greetings from Copenhagen
Alex
 
I assume that FromDate is a Date/Time field...

Date() returns today / 12:00am so,

SELECT * FROM Events WHERE FromDate >= Date() ORDER
BY FromDate ASC

will return everything since 12:00 am
 
Many Thanks for your help, I'll give it a try.
-----Original Message-----
I assume that FromDate is a Date/Time field...

Date() returns today / 12:00am so,

SELECT * FROM Events WHERE FromDate >= Date() ORDER
BY FromDate ASC

will return everything since 12:00 am
--

Stephen Travis,
Microsoft MVP - FrontPage

"Yeltum" <[email protected]> wrote in
message news:[email protected]...
Hi,

I would like to display records from my database, that
have the value of todays date in the FromDate field. I've
tried as a query:

SELECT * FROM Events WHERE (FromDate = 'SYSDATE') ORDER
BY FromDate ASC

and

SELECT * FROM Events WHERE (FromDate = 'now()') ORDER BY
FromDate ASC

but neither work, I get the error:
Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver]
Data type mismatch in criteria expression.
Number: -2147217913 (0x80040E07)
Source: Microsoft OLE DB Provider for ODBC Drivers

Could anyone help? Is their a web-site with query
statement examples?

Many Thanks


.
 
Back
Top