How do I convert unix timestamp?

I’m pulling data from an API for my app. One of the properties contains a timestamp that is in Unix time, for example:

1502978796

I’m trying to figure out how to convert this from Unix to a human-readable date. Using an online converter, the example above would actually be:

Thursday, August 17, 2017 2:06:36 PM (GMT)

What’s the best way to ago about this conversion on Bubble?

1 Like

Well the best way is to use the “Seconds to Date” plugin.

You use it in expressions by selecting the “Get data from an external API” feature. So if you are using a POST call, you can simply use it in the workflows to convert the UNIX into a date. If you are using a GET call, it’s even easier. Simply use it in the design tab.

Hope that makes sense,
Daniel

4 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.