So we always tend to go down this "rabbit hole" with a SSRS Report Start Date and End Date Parameter.
Defined within the .rdl, you have no choice but to define the Start Date/End Date Parameter as "Date/Time" Data type.
Typically within our SQL Server Stored Procedure we will define the Start Date/End Date Parameters as DATE format...makes no sense to define them as DATETIME Parameter within the Report SQL Server Stored Procedure because it is truly a Start DATE and End
DATE.
So should we then CONVERT the DATETIME filtering report data column to DATE then in the WHERE portion of the query?
Now it even gets harrier with Azure SQL and everything in UTC format.
So this is what we're doing...
AND
CONVERT(DATE,[Common].[UTCtoEastern]([TableName].[ShipDateUTC]))
>=
@StartDate_In
AND
CONVERT(DATE,[Common].[UTCtoEastern]([TableName].[ShipDateUTC]))
<=
@EndDate_In
The [Common].[UTCtoEastern] is our Scalar-valued Function to Convert the UTC DATETIME Format to Eastern Time.
Obviously our goal is to make this as efficient as possible so the wall time of our Report is as quick as possible and we'd hate to over complicate the Date conversion if it's bogging things down.
Thanks for your review and am hopeful for a reply.