Hi All,
Any one can help me how to convert YYYYMM to YYYY/MM ....please :(
The answer can vary depending on the data type and DBMS are you using.
If it is a number you could try:
substring(cast([YourField],CHAR(6)),1,4) || '/' || substring(cast([YourField],CHAR(6)),5,2)
Personally, I think the ideal situation is if you can get this done on the database side as part of the ETL process (if that applies in your situation) or in a view definition.
hi,
you can create a query calculatuon or a layout calculation,
and write this string: to_char([name_of_field], 'yyyy/mm')
into Expression Definition
bye
Hi Macpao64,
hi, my Column name is Monthid = 201004...i need to convert to 2010/04 ...
I tried by using sting iam getting error. Iam using oracle database.
RQP-DEF-0177 An error occurred while performing operation 'sqlOpenResult' status='-28'.
UDA-SQL-0114 The cursor supplied to the operation "sqlOpenResult" is inactive.
UDA-SQL-0107 A general exception has occurred during the operation "open result".
ORA-01481: invalid number format model
Did you try Lynn's suggestion?
what about: to_char(to_date([field];'yyyymm');'yyyy/mm')