01-02-13, 14:54 #1Registered User
- Join Date
- Jun 2010
Unanswered: Datepart in SQL Where Clause won't show last week of 2012
This sql expression was recommended to me as a way to pull invoices that where paid last week. I view this report every week.
Today my report is blank.
I beleive it is because of the new year and so it is looking for 2013 dates.....which I have nothing paid in 2013 yet.
Is there a change I can make to the expression so that it will pull last week, regardless of year?
Thanks so much!!!!
01-02-13, 15:08 #2Jaded Developer
Provided Answers: 20
- Join Date
- Nov 2004
- out on a limb
so what does
my guess is its the year *53 that is screwing things up...
I think you would be better off defining your date bracket based on specific cutoff ppints, or supply these values as parameters. if it were me Id use date parameters so you can make the query as flexible as required. when the bright young twonk in accountancy wants hjust yesterdays invoices or last months or last quarter its no skin of your nose just tell th eprat to put in the dates in your supplied form (that validates the dates are reasonable and use those dates in the queryI'd rather be riding on the Tiger 800 or the Norton