Hi,
I need to convert a character field to a date field in report studio. I am putting this code in the expression editor box ==> cast([Shipping Date],DATE) and I get an error. What am I doing wrong? The consultant that built the package I am using defined this field as a char. The date will only display like this 20060810. My boss wants it to display like this August 10 2006. Can someone please help me with this?
Thank you in advance!
It would help to know the kind of database you have behind that (for the data, not the content store).
???
Hi Boris,
SQL Server
Is it okay to go into Framework Manager and change the Data Type to Date Time and usage to Identifier without doing any harm?
No you can't just change the datatype in FM. In fact I don't think FM will let you.
Create another column in the query subject that will a DATETIME column. Modify the SQL to use CONVERT(), CAST() or DB specific data functions to convert the CHAR col to a DATE.
In Oracle I have:
Select MONTH_NUM,
To_date(To_char(MONTH_NUM) || '01','YYYYMMDD') As MONTH_BEGIN_DT,
CURRENT_IND
From [EPM].PS_TNT_CURR_MONTH
Thank you! I didn't realize I had to drag a query calculation to the report. I was trying to use the cast_timestamp function in the filter expression box. When the filter box is open there is a list of available functions. I thought if the functions were made available I could use them in that editor.