Have you tried wrapping it within a ROUND function?
This is a recent addition from Glide, where math columns involving dates would result in durations instead of numbers, but I would love the option to choose between “duration” and “number” in this case.
Me too. Your solution worked, and I didn’t have to divide by 24. But does the Round function allow me to still get the number of hours remaining, which I can use in a different case scenario? The “duration” looks like it is HH:MM:SS. I assume they implemented it for their EVENT picker.
It does kind of violate one of the cardinal rules of functions, however. When the date math was introduced for dates, they specified that it would work for days. Changing that two years later, to introduce the EVENT picker, they should have introduced a new function with it like DURATION(date + date) in order not to break existing apps.
This fixes me for now, but next week when I’m implementing the same thing by hours instead of days, I’ll probably be back asking more questions…
You can see I have two entries with a start date of 2/20/2022 with a duration of 8 days and a last swiped date of 2/20/2022. One shows 7 days left and the other shows 8 days left. They both end on 2/28/2022. One shows the current day in the event is 1, the other shows the current day is 2.
They were both entered at different times of day, but my dates are “short” “date only”. Is there a way to force the calculation to only look at the DATE portion? Or to have each date start with a 00:00:00 time without forcing the user to have to see the time involved as they pick the start date?
This is starting to get more complex than I expected.
Edit: I just noticed from your previous reply to Jeff that your End Date is calculated. So you’d only need to apply the above to your start date, and then calculate your end date using the result. hmm, but if your end date is calculated, why do you then need to calculate a duration - wouldn’t you already know that? haha, clearly I’m missing something