Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3167

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

$
0
0

Hello experts,

 

Below is the query i am trying to execute

 

SELECT u."name", "firstname", "lastname", "email", to_char(to_timestamp("creationdate" / 1000), 'MM-DD-YYYY') AS "creationdate",

    to_char(to_timestamp("lastloggedin" / 1000), 'MM-DD-YYYY') AS "LastLoggedDate", "value" AS "companyname"

FROM jive.jiveuser u,

    (SELECT "userid", "name", "value"

     FROM jive.jiveprofilefield f,

        jive.jiveuserprofile up

    WHERE f."name" IN ('Company') AND f."fieldid" = up."fieldid") AS C

WHERE C."userid" = u."userid" AND

     to_char(to_timestamp("creationdate" / 1000), 'MM-DD-YYYY') BETWEEN '04-12-2015' AND '04-19-2015' AND

     to_char(to_timestamp("lastloggedin" / 1000), 'MM-DD-YYYY') > '04-12-2015'

 

but i am ending up with below error

 

 

Could not execute 'SELECT u."name", "firstname", "lastname", "email", to_char(to_timestamp("creationdate" / 1000), ...' in 279 ms 664 µs .

[303]: invalid DATE, TIME or TIMESTAMP value: search table error:  [6931] attribute value is not a date or wrong syntax

 

Kindly suggest

 

Regards

Naresh P


Viewing all articles
Browse latest Browse all 3167

Trending Articles



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