Good morning,
I am trying to add a List of Dates to be used as Parameters in an SSRS 2005 Report. The reason for this is that the Report is quite resource heavy and I only want the end user to use a weeks worth of data only at any one time.
I created a dataset (script at end of post) and used that data set to populate my Report Parameters (Start Date and End Date). It works fine except for when I go and run the report, the Parameter List has been formatted into an American Date Format as opposed to British in the dataset. The report Language setting is "English (United Kingdom)".
Can anyone help ?
Thanks
DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
DECLARE @Counter INT
DECLARE @DateList TABLE (StartDate DATETIME, EndDate DATETIME)
SET @StartDate = CONVERT(DATETIME, CONVERT(CHAR(10), GETDATE(), 103), 103)
SET @EndDate = DATEADD(ss, -1, CONVERT(DATETIME, CONVERT(CHAR(10), GETDATE() + 1, 103), 103))
SET @Counter= 1
WHILE @Counter < 8
BEGIN
INSERT @DateList(StartDate, EndDate) values(@StartDate, @EndDate )
SET @StartDate = DATEADD(DD, -1, @StartDate)
SET @EndDate = DATEADD(DD, -1, @EndDate)
SET @Counter = @Counter + 1
END
SELECT StartDate, EndDate FROM @DateList ORDER BY 1
I am trying to add a List of Dates to be used as Parameters in an SSRS 2005 Report. The reason for this is that the Report is quite resource heavy and I only want the end user to use a weeks worth of data only at any one time.
I created a dataset (script at end of post) and used that data set to populate my Report Parameters (Start Date and End Date). It works fine except for when I go and run the report, the Parameter List has been formatted into an American Date Format as opposed to British in the dataset. The report Language setting is "English (United Kingdom)".
Can anyone help ?
Thanks
DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
DECLARE @Counter INT
DECLARE @DateList TABLE (StartDate DATETIME, EndDate DATETIME)
SET @StartDate = CONVERT(DATETIME, CONVERT(CHAR(10), GETDATE(), 103), 103)
SET @EndDate = DATEADD(ss, -1, CONVERT(DATETIME, CONVERT(CHAR(10), GETDATE() + 1, 103), 103))
SET @Counter= 1
WHILE @Counter < 8
BEGIN
INSERT @DateList(StartDate, EndDate) values(@StartDate, @EndDate )
SET @StartDate = DATEADD(DD, -1, @StartDate)
SET @EndDate = DATEADD(DD, -1, @EndDate)
SET @Counter = @Counter + 1
END
SELECT StartDate, EndDate FROM @DateList ORDER BY 1