Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with date fromat in access 1

Status
Not open for further replies.

numbered

Technical User
Jun 10, 2002
54
CA
I have this in my database jobs

jobs_id type start_date end_date
10 management 02/10/2002 11/10/2002

SELECT *
FROM jobs
WHERE type = 'management'
AND (day(start_date) & month(start_date) & year(start_date)) <= (day(now()) & month(now()) & year(now()))
AND (day(end_date) & month(end_date) & year(end_date)) >= (day(now()) & month(now()) & year(now()))

It returns 0 records. Why am I not getting that record?
 
This may seem simplistic, but it will work

SELECT *
FROM jobs
WHERE type = 'management'
AND [start_date] < now()+1
AND [end_date]> now()-1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top