In cases like this I prefer using Date Difference (jmp.com) as it manages time / different intervals usually better. It might require some tries to get it working correctly (play around with alignment) but in my opinion it is worth it
Names Default To Here(1);
row_count = 40;
dt = New Table("dates",
Add Rows(row_count),
New Column("End date",
Numeric,
Continuous,
Format("Format Pattern", "<YYYY><-><MM><-><DD> <hh24><::><mm><::><ss>", 19, 0),
Input Format("Format Pattern", "<YYYY><-><MM><-><DD> <hh24><::><mm><::><ss>", 0),
<< Set Each Value(Today() - In Days(row_count - Row()))
)
);
dt << New Column("difference", Numeric, Continuous,
<< Formula(Date Difference(:End date, now, "Day"));
);
-Jarmo