SELECT julianday('2026-03-09 08:00') - julianday('2026-03-02 19:40') AS days,
julianday(date('2026-03-09 08:00'))
- julianday(date('2026-03-02 19:40')) AS calendar_days;
With times in the column, a test like = 7 almost never matches. Decide whether 7 days later means calendar days or 168 hours. Then cut both values to dates, or compare hours, on purpose. A column of dates with no times already gives whole numbers.
Last, ask which time zone the timestamps are stored in, and which one the question's days are in. An order stored at 02:30 UTC on April 1 was placed at 22:30 on March 31 in New York.
In the editor, fix FIRST_TO_SECOND: calendar days, so Cy's two orders, a night and a morning apart, count as 1 day.