Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: HANA date format

$
0
0

Hi Pallavi,

 

Since the data in the table is of NVARCHAR datatype, the TO_CHAR function would fail.

 

It issue can be resolved in the below following way:

 

create table date_test(col1 nvarchar(10));

 

insert into date_test values('2015-10-09');

 

select to_char(to_date(col1, 'YYYY-MM-DD'), 'YYYYMMDD')

from date_test;

 

You need to use to_char(to_date(col1, 'YYYY-MM-DD'), 'YYYYMMDD')

 

Regards,

Anil


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>