Dear Bubble Forum Members,
I would like to format the result of a calculation as days if the “current date” - “comment creation date” > 1 day, and hours if it is less than or equal to 1 day.
In the image below, I would like to add something like: if (current date/time - Current cell’s post comment’s Creation Date) > 1 day:format as days, else format as hours, but that’s pseudo coding and Bubble is a no-code tool so that’s not working.
How can I achieve this? Any help or tips are highly appreciated!
I read this but could not find out how to format based on conditions.
Operators and comparisons - Bubble Docs.
A possible workaround is to create two separate text elements, and format one as days and the other as hours. Then I would show one or the other based on a condition (whether days since comment is larger or smaller than 1). I feel that this workaround is tedious though.