Database Results Wizard - records with todays 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
 
A

Alex

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
 
S

Stephen Travis

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
 
Y

Yeltum

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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top