in reply to Re: MySQL datetime
in thread MySQL datetime

That factors in the time, despite instructions to the contrary

Replies are listed 'Best First'.
Re^3: MySQL datetime
by hippo (Archbishop) on Jul 01, 2025 at 17:27 UTC

    Does it, though? So long as one is only concerned about whole days of difference (as appears to be the case for the OP) that fact that one of the stamps has a time doesn't matter.

    But if you want to be able to compare for fractional days then Line 17 should be amended to read

    my $dayssince = (localtime()->truncate(to => 'day') - $tp) / ONE_DAY;

    🦛

      My bad. Comment retracted.