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

Calculate Year To Date

Status
Not open for further replies.

puforee

Technical User
Joined
Oct 6, 2006
Messages
741
Location
US
I want to limit the output of a query to only include records from this year to date.

Can someone help with a query function that will do this.

Thanks,

 
something like this:

Code:
WHERE Year(YourDateField) = 2008

HTH

Leslie

In an open world there's no need for windows and gates
 
lespaul,

Thanks...this is very close. I simple change yous to WHERE Year([YourDateField]) = 2008 ....added the field name brackets, and it works just fine.

Thanks....I was very close and you nudged me to the correct solution.
 
you only require the brackets when there are spaces in your field/table names...

Glad I was able to help!

Leslie
 
I was going to do that, but I always get Access date functions mixed up with my "real" programming date function (not that Access isn't real programming, I just don't do any! All my programming is in Delphi & Java).

And I was wrong in what I was going to put for Date()...in Delphi it's Today and that's what I was going to put, but I had a feeling it wasn't the correct one!

Thanks Duane!

Les
 
Actually I did make it generic with a Year(Now()) statement.

Thanks for all of your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top