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

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

$
0
0

Hello Naresh,

 

the format of "lastloggedin" is the same as you described above for "creationdate"? Did you check if all values for both columns have a valid value in the specified format?

 

One problem (which do not cause the error) are the date comparisons in your outer where clause. The to_char function produces a value in format 'YYYY-MM-DD'. Comparing it to values in format 'MM-DD-YYYY' does make much sense. Also the character based comparsion does not make sense for the date values. You should remove the to_char function in the where clause and comparte date values, e.g. to_date("creationdate", 'MM-DD-YYYY') BETWEEN to_date('04-12-2015','MM-DD-YYYY') AND to_date('04-19-2015','MM-DD-YYYY').

 

Regards,

Florian


Viewing all articles
Browse latest Browse all 9069

Trending Articles



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