Skip to content

Commit a71cc0b

Browse files
authored
fix end date for batch process
the old code does a process date between start and stop date BUT processdate is a DateTime so any datetime after 0.00 on the last day was NOT taken into account
1 parent 85b74fe commit a71cc0b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sql/stored_procedures/uspProcessbatch.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ BEGIN
5959

6060
DECLARE @startDateMonth date = DATEFROMPARTS(@Year, @Period ,'01')
6161
DECLARE @startDateYear date = DATEFROMPARTS(@Year, '01' ,'01')
62-
DECLARE @endDate date = EOMONTH(@startDateMonth)
62+
DECLARE @endDate date = DATEADD(day, 1, EOMONTH(@startDateMonth))
6363

6464

6565
-- if @endDate > GETDATE()

0 commit comments

Comments
 (0)