View only records of the current year

mtagliaferri

Registered User.
Local time
Today, 19:39
Joined
Jul 16, 2006
Messages
550
The solution might be in front of my nose but I cannot see it... I have a query with all my records I need to extract only records of the current year, so that now will show all 2006, as we enter into the following year it will show all the 2007.
What is the criteria I should put into the "Date" field I have?
Thanks
 
Try this:

SELECT tblTable1.MyDate
FROM tblTable1
WHERE (((Year([MyDate]))=Year(Date())));

The Year function extracts the year part from the field in question and then its matched with Year function that pulls the year from Todays date.

HTH
 
Thanks very much!
Marco
 

Users who are viewing this thread

Back
Top Bottom