dandanearl
Technical User
I'm looking for some validation on my date range solution.
I'm running a sql query in crystal reports as a command that is looking at the performance of an employee during their pay period(bi-weekly). I'm using business objects to automate the creation/sending of the report in excel format every 15 days on the monday after the end of their pay period. In my sql I have a fixed date constraint of:
The pay period always starts on Sunday at 12:00:00AM and ends on following Saturday 11:59:59PM. The report is generated on Monday -2 = Saturday and Monday - 15 = Previous Sunday to capture 14 day period.
Am I thinking this through correctly?
Thanks
I'm running a sql query in crystal reports as a command that is looking at the performance of an employee during their pay period(bi-weekly). I'm using business objects to automate the creation/sending of the report in excel format every 15 days on the monday after the end of their pay period. In my sql I have a fixed date constraint of:
SQL:
(logdate BETWEEN dateadd(day, datediff(day, 0 ,getdate())-15, 0) and dateadd(day,datediff(day, 0 ,getdate())-2, 0))
Am I thinking this through correctly?
Thanks