Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2015-09-01 18:46:24

jessicalin
Member
Registered: 2015-09-01
Posts: 4

convert to datetime

Hi,

I was using the API to retrieve metadata of an asset. One of the metadata is a date - "uploaddate" and I am getting the following value back.

"uploaddate": [
  {
  "value": 1440671331,
  "inherit": false,
  "override": false,
  "depth": 0
}
]

How do I convert the value "1440671331" to a date?

Thanks

Offline

#2 2015-09-01 18:50:49

sam
Third Light Staff
Registered: 2013-06-06
Posts: 6

Re: convert to datetime

Hi,

That's a Unix timestamp ('epoch'). Rather than me explaining it, this page has a good overview plus a number of small snippets showing how to convert an epoch to human readable date:

http://www.epochconverter.com

Cheers,

—S

Offline

#3 2015-09-01 19:18:12

jessicalin
Member
Registered: 2015-09-01
Posts: 4

Re: convert to datetime

That explains it, thanks for the quick response!

Offline

Board footer