Streaming live at 10am (PST)

UNIX code to readable time format

I’m trying out some Zapier intergration with Webflow CMS.

One field is a UNIX code like 1500516503. I want to translate that to a readable 24h clock format like 16:37.

The javascript should be simple but my skills are not enough =)

Can someone help me?

var postDate = new Date(1500516503 * 1000)

will give you local datetime:

Thu Jul 20 2017 12:08:23 GMT+1000 (AUS Eastern Standard Time)

Use these getter methods to get each part of the time you need


Perfect! You solved it.
Now I have to admit my skills are not enough even for this :neutral_face:

I now I have to wrap it in script tag. And I need to somehow tell which class the script should look inside. But I don’t know how. I’ll try and see where I’m landing with this.

I tried several times to learn the syntax but fails every time to get it to stick in my head :stuck_out_tongue:

Nope, can’t make it happen @samliew If you could give me a more complete script/solution would be great but otherwise I will rethink that.

I’m thinking an embed where I could add a field from the collection with the unix code and the output will be
in the correct format.

I’m always available here.

1 Like

Thanks @samliew, this is not for a client just for practice so I don’t want to spend any money. I’ll if I can solve it some how. Thanks for your tips :beer: