qry for dates in 1st 2nd 3rd and forth quarters of current year!

S

smason

Hello i am looking to write a query which returns values for the current year
only!

DatePart("q",[Start Date],Year([start date])=Year(Date()))

is what i have written but this includes enteries for next year which i
dont need! any ideas please!!!

thanks in advance
 
S

Stefan Hoffmann

hi,
DatePart("q",[Start Date],Year([start date])=Year(Date()))
is what i have written but this includes enteries for next year which i
dont need! any ideas please!!!
You need to filter for the current year, e.g.

SELECT DatePart("q",[Start Date])
FROM [yourTable]
WHERE Year([Start Date]) = Year(Date())



mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top