Skip to Content
0

How to convert date from jan 22 2106 to 20160122??

Jan 18, 2017 at 04:42 PM

45

avatar image

Hi everyone i just want know how to convert string date format to standard sap format lik(yyyymmdd) by using Calculated columns

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Florian Pfeffer
Jan 19, 2017 at 08:03 AM
0

Hello Nari,

you can use a calculated column with SQL language using functions TO_DATE and TO_NVARCHAR to reach your goal. Check following example.

Calculated Column (column "DATE_STRING" contains the date value in your described original format):

Result:

Of course it would be nicer to use function TO_DATS (which converts a date into the ABAP Date format) instead of TO_NVARCHAR, but this function is not supported in a calculated column at point of time writing this.

Regards,
Florian


result.jpg (28.7 kB)
Share
10 |10000 characters needed characters left characters exceeded