Query on Year only

Trevor Howard

Registered User.
Local time
Today, 18:07
Joined
Aug 29, 2002
Messages
64
I would like to run a query to return all dates for a year like 2007. I need to ignore the day and month so the user will be asked to enter the year “2007” they require a form list on.

I have used the between date query:- Between [Start Date] And [End Date], and it’s okay but it would be much faster if only one parameter can be typed to return a list of the full year.

Any help would be appreciated, I cant find anything here which helps.
Thanks!
 
Add a calculated column in your query
MyYear: Year([MyDateField])
Apply the criterion to the calculated field.
 
Use something with the function dateserial...

If you allways want the year....
Dateserial ([Please enter the year],1,1) will return Jan 1st of said year.
Something simular to return dec 31, the between you allready have and ... done :)
 

Users who are viewing this thread

Back
Top Bottom