Hello everyone,
I have a report that does date grouping by week. Of course that all works fine. In the report are commissions and gratuities that get totaled per week and of course that is working fine as well (I know, if everything is working so FINE why are you calling? Yeah). However, the week grouping by default has the start day either Sunday or Monday. I want my start day to be Thursday. Which means the payweek is from Thursday to Wednesday and payday is Friday.
When I run the report it is totalling to the best of it's (and my) ability but it isn't correctly reflecting the pay week. If there is no DATEFIRST way of handling this in code is there syntax for a SQL statement that gets the proper information? Something like
SELECT Commission, Gratuity FROM MyTable
GROUP BY WEEKS STARTINGDAY = 4
(I know this is incorrect SQL but I hope I'm getting the thought across)
I would much prefer to just tell the program what the STARTDAY is and let it manage the rest but a simple SQL statement would be as reliable(probably).
Any ideas?
Lamar
I have a report that does date grouping by week. Of course that all works fine. In the report are commissions and gratuities that get totaled per week and of course that is working fine as well (I know, if everything is working so FINE why are you calling? Yeah). However, the week grouping by default has the start day either Sunday or Monday. I want my start day to be Thursday. Which means the payweek is from Thursday to Wednesday and payday is Friday.
When I run the report it is totalling to the best of it's (and my) ability but it isn't correctly reflecting the pay week. If there is no DATEFIRST way of handling this in code is there syntax for a SQL statement that gets the proper information? Something like
SELECT Commission, Gratuity FROM MyTable
GROUP BY WEEKS STARTINGDAY = 4
(I know this is incorrect SQL but I hope I'm getting the thought across)
I would much prefer to just tell the program what the STARTDAY is and let it manage the rest but a simple SQL statement would be as reliable(probably).
Any ideas?
Lamar