Formatting for Unix date

What’s the best way of turning a unix formatted date received from an api, such as:

1671148800000

into something more recognizable such as Feb 12th 2023 and save to the database?

Hey @peter8 ,
If your field type in DB is date, then save it directly as unix and while displaying you can use “formatted as” and convert it to any format you like.

image
When initializing the api call. For the date field mark it as date(UNIX) and bubble will autoconvert it to appropriate date format in your DB.

4 Likes

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