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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Date Format in SSRS

Author  Topic 

sandesh.ravi
Posting Yak Master

110 Posts

Posted - 2011-10-25 : 06:06:46
Hi,
I am getting the '20111024130900' from the result set in SSRS. I need to format the date in 24/10/2011 13:09:00.

Kindly let me know the expression to use in the text box.

Thanks,
Sandesh

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-25 : 06:13:53
you've standard date format available with cell properties in ssrs. ANother way is to use Format() or FormatDateTime() function

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

Go to Top of Page

sandesh.ravi
Posting Yak Master

110 Posts

Posted - 2011-10-25 : 07:15:48
Getting an error using FormatDateTime

[rsRuntimeErrorInExpression] The Value expression for the textrun ‘ReceivedDate.Paragraphs[0].TextRuns[0]’ contains an error: Conversion from string "20111024130900" to type 'Date' is not valid.

How to format the date to 24/10/2011 13:09:00. from 20111024130900 in SQL.

Thanks,
Sandesh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-25 : 07:44:05
you're retrieving it as a string. then direct conversion is not possible. you need to cast it to date before applying format

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

Go to Top of Page
   

- Advertisement -