Format as year/month/day

A quick one, I hope.

How does one go about formatting a difference between dates as months/years
since bubble only gives you these options.

image

Cheerios

Date operations output number. To get a (not exact) number of months, you can go format as days / 30 :floor.
So you’ll get 0 months for anything below 30 days, 1 month for anything between 30 and 60, etc etc.
If you need something more specific, let us know and we’ll try to help :slight_smile:

Ah of course, thanks!

Is there an easy way to combine this into years/months/days?
Sounds like it will get really complex and messy quickly trying to get something like
“2 years 5 months and 3 days”. and only show years if days > 365. and only show month if days > 30/31 and so forth.

Shame this isn’t built in :wink:

In my experience, it will get messy yes. I’ve only accomplished it using :floor and :modulo. Though once you’ve built it out, it’s quite fast. Alternatively, you can check this plugin to see if it has the functionality you need:

1 Like

Thanks! unfortunately it looks like it’s too vague. It’s probably only useful when the timestamp isn’t of any importance. e.g. a blogpost. :frowning:

Could you share an example of how you strung it together
by using modulo?

Are more people in need of detailed time string options? Maybe it’s worth a feature request?

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