How to display pending time in pending list ?

Confluence User - 02 Feb, 2017

I need to display pending time in pending list , can you please have suggestion or guide for me.

*** I found column name such as created , activated but their data type is number not datetime or stampdatetime.

** I try to use function for convert that number such as 

to_char(to_date('01-jan-1970')+((CREATED+25200)/86400), 'DD-MM-YYYY HH24:MI:SS') ... CREATED is field name. but it not work.

Thanks

Surasak 

datalists

5


03 Feb, 2017
confluenceUser
confluenceUser

Hello, I think the data you mentioned is really a "unix time".

Did you take it from the "shkactivities" table? If so, you should take the first 10 digits of the int number and then apply something like (this in postgresql)

SELECT to_timestamp (1480281144)


or (in mysql)

FROM_UNIXTIME () 


This data is a time in seconds (or sometimes in milliseconds depending on the operating system, I think), so it should also work, to convert it to date + time something like: 

SELECT timestamp '1970-01-01 00:00:00' + interval '1480281144 second';
03 Feb, 2017
confluenceUser
confluenceUser

Example: "shkactivities" table have "ACTIVATED" column ** number 13 digit ** first 10 digit ... Select ID , TO_TIMESTAMP(SUBSTR(ACTIVATED,1,10)) ,ACTIVATED From SHKACTIVITIES Error : not valid month *** TO_TIMESTAMP not work. but I'll try ...

03 Feb, 2017
confluenceUser
confluenceUser

What database are you using?

03 Feb, 2017
confluenceUser
confluenceUser

Oracle 11g :)

14 Feb, 2017
confluenceUser
confluenceUser
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print