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
 Development Tools
 Reporting Services Development
 help with datetime parameter

Author  Topic 

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2007-10-04 : 06:35:26
Hi,



I managed to format the parameter as I wanted

=Datetime.Parse("01/01/1990").ToString("dd/MM/yyyy")



However, if i enter the date 31/12/2006 and run the report I get the following error: 'error converting data type nvarchar to datetime.



However, if in the report itself i change the parameter's datatype to datetime i then get the following error:

'The property DefaultValue or report parameter 'to_date' doesnt have the expected type'



What can i do to solve this?



Thanks





Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-10-04 : 06:40:45
The code you show us is NOT SQL Server!
Please show us the code that generates the error...



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2007-10-04 : 06:59:04
There is no code. It's a report parameter

Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-04 : 08:10:35
Try inputting 20061231 instead of 31/12/2006

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -