The function deducts 1 days from a finish date IF the time portion is 00:00:00 Why: Midnight is a ‘point’ with NO duration, Midnight is actually 2 things: - The end of a day - The start of the next day Or, for the visual thinkers (see image) ….
the black arrow perspective of midnight is different to the white arrow perspective of the same yellow point in time Clarity treats FINISH datetime fields as “the end of the day� So the finish of a day could be 2009-10-08:24:00 But databases don’t store 24:00, they store 00:00 instead SO The end of 2009-10- 08 is stored as 2009-10- 09 :00:00 (because they are actually the same point in time) HENCE, you will often find you need to do -1 on a datetime IF the time of day is 00:00 AND the field is a FINISH [ & also , if a datetime holds anything except “00:00� in the time portion then you do not need to -1, because the black view and white view result in the same date ] Clear as mud I know, I have tried to explain this many times and never been able to make it simple.