Count the number of days between two dates

Count the number of days between two dates.
I have a logbook app where I log sailings with my boat. When I start a trip, I log the date and mark the row with the start. when I finish the trip, I log the date and mark the row with completion. how do i count the number of days between the two dates? There can be several rows between the start and end date

The math is simple. Just use a math column to subtract one date from another. The tricky part is getting both dates in the same row so you can do the math. That could be done with a Query/Single Value or a Relation/Lookup. That’s assuming that each log row has something to identify which to it belongs to so you can establish the query or relation.

Unfortunately, I don’t have anything that identifies which trip the log grades belong to, only that the first one is marked with start, then the next ones are marked with in progress, while the last one is marked with completion.

Do you ever have more than one trip? What if you took two trips. How would you differentiate which logs below to trip 1 and which logs belong to trip 2? Might want to figure that out first, and if needed, add a column to the log table to hold a Trip ID or Name, and automatically fill it whenever a new log is added. This will determine how and where all the other columns are configured. If it were me, I would have a Trip table with details for each trip and a Log table to record each log for a particular trip.

1 Like