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

Re: Timestamp conversion

$
0
0

Hi Lars,

 

function TO_TIMESTAMP is not available in calculated attributes, but only in direct selects.

 

Assuming, DB field COMPLETE_BY provides a DEC 15 timestamp, then a calculated fiel in an attribute view with expression :

 

utctolocal(longdate("COMPLETE_BY"),'AUSWA')

 

provides for e.g. COMPLETED_BY = "20.140.305.225.959"

 

     06.03.2014 06:59:59.000 if calculated field type is TIMESTAMP

or  06.03.2014 if calculated field type is DATE

 

That's what I wanted to achieve.

 

If wonder, why

1)    the documentation provides a hard coded example only that is not really helpful :

"SELECT  UTCTOLOCAL (TO_TIMESTAMP('2012-01-01 01:00:00', 'YYYY-MM-DD HH24:MI:SS'), 'EST') "utctolocal" FROM DUMMY;

instead of a real scenario.

2)    the documentation doesn't refer to both scenarios, SELECTS and calculated fields in views

3)    the HANA documentation is wrong since utctolocal(datearg,timezonearg) should be

utctolocal(timestamparg,timezonearg) including the missing information how to convert ABAP timestamps (DEC)  into HANA timestamps (whatever it is?).

 

However, thank you

 

Regards,

Ulf


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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