Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

Re: how to use to_char(to_timestamp("creationdate" / 1000), 'MM-DD-YYYY') in hana

$
0
0

Hi Naresh,

By seeing at your query , it seems you have to understand the actual reason, why in the postgresql , the division has been done.

 

if you do write the below SQL, it will serve the purpose, but while you comparing the same again with date doesnot makes sense.

 

Try to understand the actual need of that division and if that is not at all avoidable, try as below.

 

SELECT TO_INTEGER(TO_TIMESTAMP('04-12-2015', 'MM-DD-YYYY')) "to date" FROM DUMMY;

 

 

It doesnot makes any sense , you divide the date value with 1000, or compare the String with Date, without even comparing.

 

Regards,

Chandan


Viewing all articles
Browse latest Browse all 3458

Latest Images

Trending Articles



Latest Images

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