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

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

$
0
0

Hi Shanmugavel,

 

i executed the below query as you said

 

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

    to_char(to_date("lastloggedin", '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_date("creationdate", 'MM-DD-YYYY')) BETWEEN '04-12-2015' AND '04-19-2015' AND

     to_char(to_date("lastloggedin", 'MM-DD-YYYY')) > '04-12-2015';

 

but its throwing below error

 

Could not execute 'SELECT u."name", "firstname", "lastname", "email", to_char(to_date("creationdate", 'MM-DD-YYYY')) ...' in 271 ms 936 µs .

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

 

Regards

Naresh P


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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