Hi everyone, I’m new to bubble
I have this new-list API work-flow that will return a list of new like this formarted as text
{
"id": "This New's unique id",
"title": "This New's summary",
"excerpt": This New's content:formatted as JSON-safe,
"image": "This New's image_noti is not empty:formatted as text",
"date": "This New's Creation Date:formatted as 04/06/2024",
"type": "This New's type_notification's Display",
"views": 2345
}
Is it possible to convert the returned creation date into a relative time format like 1 minute ago, 1 day ago, 1 week ago, 1 month ago, etc …?
Use currentdate/time - date recieved from api:formatted as days or minutes
That won’t work for post that is created several weeks or several months ago?
To begin with don’t format the date, otherwise it will save as text instead of date.
Try this -
Currentdate/time - APIdate’s value:formatted as days/7:floor - This will give you week ago result.
For calculating months use conditional statement -
When current date/time - APIdate’s value:formatted as days:floor>30
then
Initial Data - Current date/time - APIdate’s value:formatted as days:floor/30:floor.
This will 100% give you results.
If this works out, please mark this as solution?