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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matching Different Date Formats

Status
Not open for further replies.

MarkNie

Technical User
Sep 22, 2005
102
GB
Hi All

Hope you are well..

I am trying to run a query between a tbl and another querie, the problem I am having is that I would like to show the records where 2 date fields match. The one has a format Short date & the other has Date/Time, I just want to match the dates and not the time, any ideas??

Here is the code I am using:

SELECT tblTracking.PortfolioCode, tblTracking.RunDeadline, qrybAttn.Action, qrybAttn.Date
FROM tblTracking INNER JOIN qrybAttn ON tblTracking.TrackingID = qrybAttn.TrackingID
WHERE (((tblTracking.RunDeadline)<Now()) AND ((qrybAttn.Date)=[RunDeadline]))
WITH OWNERACCESS OPTION;

Thanks in advance!!!!!!

Cheers
Mark
 
Change your Where clause to this...

WHERE (((tblTracking.RunDeadline)<Now()) AND
((Format(qrybAttn.Date, "Short Date")) = Format([RunDeadline], "Short Date")))
 
Hi rjoubert

As easy as that you say!!!

Thanks alot working perfectly...

Have a great day.

Cheers
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top