Use only DATE, not TIMESTAMP

Hi guys. Im trying to do a RG, which has the dates as the first “column”. The dates are coming from a thing (of type date).

The problem is that it is registered the timestamp, not the date only (day, month and year). I know I can format to show only the date, but the problem is that the value is still a timestamp. This way I cant group other values in the RG for that specific date.

For example:

RG with two texts:

  • date
  • sum of all numbers of that date (like a group by)

Any ideas?

How is the date value being set? Would it be possible to set the time value to zero when the date is saved?

Yeah, if you can change the time when it’s first saved, that should help. You can do something like Date = Current Date/Time:change hour to 0:change minute to 0.

Or, you sum all numbers of the current cell’s date: formatted as mm/dd/yyyy so that it only matches the date format and leaves out the time - you’re matching by a text value now.

I think you’ll have to run a search inside of each cell that searches for all things that fit into the desired date range and sums their value(s).

So you need to create a list of numbers that correspond to the number of date ranges you want and set THAT list as the list for the repeating group. Then maybe you can combine the offset with a seed date to get the right date for each cell and run the search.

Bubble doesn’t do loops or repeats. What you’re asking for is basically a loop where you iterate through a list of constraints and sum up the results of each search to generate a list of the results of multiple searches. It’s trivial in any other programming environment, but Bubble aggressively guards its shared AWS resources and can’t afford to let repeats or recursions take all of the server’s capacity away from other apps, so it’s just not possible at all.

Theres a plugin that generates a list of numbers. You can use it to create the list of offsets for the repeating group.

Thank you all @romanmg @blueback09 and @sudsy! I’ve tested both ways, and both worked out. As it was easy to set-up and to maintenance in the future, I chose to save the save changing seconds, minutes and hour to 0, so that I don’t have to repeat this changes in all RGs and searches workflows in the future. Thankya!!!

1 Like