Day formula is calculating correctly but the cell is showing a wrong result

Make your Day column a Number type.

Why this is happening:
Dates are actually Numbers in Coda, e.g. today is 44220. This is the number of days since 12/30/1899 12:00 AM in the local timezone (for some reason it’s not 1/1/1900 but this):

image

Time is fractions of days, e.g. today 12 PM would be 44220.5, and today 6 PM would be 44220.75.

What you see is Day(Start time), which is 22, converted to the “22 days since 12/30/1899”, which is Jan 20. So yeah, just change the column format to Number there, because 22 is a number, not a date.

image

(for me it says Jan 21, but that’s perhaps because of some timezone adjustments, not sure completely yet what exactly happens there)

If you just need to strip time information (so that values with the same day but different time get into the same group) use StartTime.ToDate() or StartTime.DateTimeTruncate("day")

1 Like