Forum Documentation Showcase Pricing Learn more

Convert stripe unix timestamp to date

I have searched the forum. And there seems to be a workaround without a plugin but the images showing how are deleted and the topic is closed.

Can anyone show me how I convert a unix timestamp which I receive from a stripe webhook with or without a plugin. The easiest way for me is to place the unix timestamp into the database and then show it with a text field or date field. It’s only to show the date of a invoice. no complicated maths.

I sorted it out myself. This works for me

Create a new thing in the database (I called it * App - UNIX timestamp)
Create a new field in the database (I called it UNIX start date)
Enter one value for the UNIX start date = 01/01/1970 12:00 am

Now you can use this value as reference. For stripe I receive a webhook with dates expressed in seconds. Do the following:

  1. Make sure the date field is picked up by Bubble as a number

  2. Now make a workflow and insert the date from the webhook:

So basicly you do the date 01/01/1970 12:00 am + seconds

1 Like

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