Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Dates in MRS

Author  Topic 

Shelly1
Starting Member

25 Posts

Posted - 2010-02-18 : 06:08:25
I have set up parameters in report manager to include a calender

I have set the paramter @sd as DateTime with a non queried value =dateadd("d", -6-weekday(dateadd("d", 0, today()), 1), today())

@ed as DateTime with a non queried value =dateadd("d", -weekday(dateadd("d", 0, today()), 1), today())

In my stored proc i have declared the value for SD and i have set the dates to english:

@sd datetime, @ed datetime
set dateformat dmy


This all seems fine to me however i keep getting the following message:

The value provided for ed is not valid for its type.

Thanks

Mich

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-18 : 06:50:37
dont set dateformat like that using set

always try to pass date in format ccyymmdd

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Shelly1
Starting Member

25 Posts

Posted - 2010-02-18 : 07:03:40
Thank you, however i get the following:

SET DATEFORMAT date order 'ccyymmdd' is invalid.

Mich
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-18 : 07:06:44
quote:
Originally posted by Shelly1

Thank you, however i get the following:

SET DATEFORMAT date order 'ccyymmdd' is invalid.

Mich


My suggestion was not to do that

rather in queries use

where datefield > '20100112'

etc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -