ggrant34
Jun 10, 2020Copper Contributor
SQL Report giving wrong data
We use Crystal Reports for specific reporting here and SQL is run the background. Having an issue where the data is wrong. There is a start time and an end time and am looking for the duration, the weird part is for some of the entries the data is correct but for majority of the entries the data is wrong. I'm not sure where to look in the code. Any help would be appreciated.
SET @START_DATE = CONVERT(DATETIME, CAST(@START_DATE AS VARCHAR(11)))
SET @END_DATE = @END_DATE + 1
SET @END_DATE = CONVERT(DATETIME, CAST(@END_DATE AS VARCHAR(11)))