Forum Academy Marketplace Showcase Pricing Features

Dynamically displaying a day of the week relative to date data

Does this seem possible?

I want to have a text element that always dynamically display’s the date for the Wednesday that is prior to dates in the database…

For instance, If the database had a date of Thursday October 20th, the text element needs to dynamically output the most recent Wednessday (e.g. Wednesday October 19th.)

Likewise, If the database had a date of Monday October 30th, the text element needs to dynamically output the most recent Wednessday (e.g. Wednesday October 26th.)

I’ve been messing around with some of the Date Type and Date Range Type operations for a while now and I can’t seem to determine how to do this or if it is possible!

Hey there,

Check out what I did on this page: https://bubble.io/page?type=page&name=identify_date&=&id=forumapp3&tab=tabs-1

(Edit: I changed the link)

I used a calendar element so you could easily confirm the dates. Basically you’re identifying which day of the week the selected date is and then subtracting the relevant number to get to the previous Wednesday.

It’s all done in the conditional tab of the text element and the key feature here is the :extract day modifier to identify each day.0 = Sunday to 6 = Saturday.

The default text is for Wednesday although you could also add that condition and leave default to current day or just the selected day depending on your needs. Let me know if this is what you were looking for!


Gaby | Coaching Bubble

3 Likes