1h for 1 hour ago.
3d for 3 days ago
It’s discourse so bubble doesn’t really control the date formatting (to my knowledge).
If you wanted to do this in your bubble app, you’d use the plugin “Relative time.”
We have a tutorial for this at nocodify.com.
Thanks. That was helpful and you got $5 from me
But what I really wanted the super short form. So 1m vs 1 minute ago
How can I create apps with this
There’s a setting on the plugin to remove the suffix!
Thanks. But I think it still says 1 minute vs 1m?
In pure Bubble, this can be achieved through simple subtraction and formatting…
Of course, the above example assumes the chosen time is in the past.
Here’s a more advanced example which handles past and future date/time selections.
That’s cool and thanks for sharing. Could I then parse out just the part I want?
Eg 18m ago using the example below
It would be best to learn how to build what you need from scratch. There’s an edit mode link in the upper right, although as I said, it’s an advanced example.
It might be best to try to replicate the simple example in the image I posted and go from there. Or just stick with whatever other solution you’ve found that works.
I just wanted provide an example using pure Bubble, as there seems to be a fair amount of confusion about how Bubble dates work and what you can do with them. They’re actually pretty powerful and flexible, but like anything else, you have to take the time to learn how to use them.
Is that not what I posted in my screenshot? The reference date in that case is from a date picker but could be from any source.
I just now reviewed what your screen shot referenced…looks like they are different.
What I put up doesn’t utilize any custom states on the date picker but instead just uses some math formulas to extract the specific days, hours or minutes that had passed since some event took place to be used as conditionals so that then the text of an element can change to reflect if it has been some number of days, hours or minutes that had passed since the event.
In my example the days, hours, minutes and seconds would not all be shown regardless of the amount of time that past…instead what I had shared would render a text element that would look like
2 days ago
12 hours ago
5 minutes ago
Just another way to do something that gets closer to what the relative time plugins do, but without needing to fuss over how the plugins do not provide the abilities to edit the expressions
Nor does mine. I don’t think you’re looking at my screenshot. No custom states (or conditionals) - just bare-bones subtraction and formatting.
No worries though. Repetition and variation certainly don’t hurt - especially with dates.
No, I wasn’t looking at the screen shot…I was looking at the editor of the advanced example. I guess I had looked at the screen shot as being one uploaded by malcolm