Need help with calculating time between two date/time values

I am in the process of creating a check in/out system for a client. They would like to save the check in and out times for each individual, then calculate their total time worked during that shift. Who would I calculate the time between two date values?

If anyone is willing to help me figure this out I will give you access to the app to get a better idea of what I’m trying to do.

Thanks :slight_smile:

Here’s a list of the operations you can do with a Date. https://bubble.io/reference#Data.Messages.date You’ll want to use minus (-) operator.

1 Like

Hi Scott, I wonder if you can help:

I have built an appointments system and want to be able to show all appointments in a repeating group, based on a date picked from a date picker. Obviously I want to find all appointments already made on that date, regardless of the time.

I find = operator does not work as it is looking for an exact time (as time is part of the date) and > operator finds every future dated appointments as well as the chosen date!

This is driving me crazy - what expression would you suggest here for this use case?

Many thanks in advance.

Hi @kenlaji
You can try this

4 Likes

Thanks a million - that’s very good and makes sense. Just tried it - works like a charm! A bit of a long winded way to achieve something straightforward, but it has helped achieve what I wanted.

1 Like

@MindForApps I’m hoping you or someone can make a suggestion when using a grouped cell’s date instead of a date/time picker. I have a list of call notes that I want to group by date and then have all the call notes under that date. It currently looks like this, but all the call notes are showing in each grouped cell.

I have a parent repeating group that is grouped by the call notes creation date

Then I have a child repeating group that shows the call notes and details.

I can’t figure out how to show only the call notes that have the parent repeating group’s creation date. So if a note was created on October 24, 2020, I only want call notes created on October 24th to show in that group.

Any suggestions?