Date Difference

I want to calulate the day-differece between to time-instants (I got them from time.now). The Problem:
The 1st Instant is from 1 msec before Midnight, the next ist from 1 msec asfter midnight (2 msec later!), this should give the dfference of 1 day!
Any suggestions?

Please show your relevant blocks

This works for me...

image

1 Like

No, 2 millis.
Why should the difference be one day?

1 Like

Thanks for your reply - I think this will help me!
Why should the difference be one day? So when you ask somebody:"when did you arrive?", the answer will be: yesterday! or: three days ago! No matter whether he arrived short after midnight or short before midnight. And no matter whether I ask this question short after midnight or short before midnight. The case "today-1" and "today+1"is an extreme test-scenario, but the correct answer should be:"yesterday"
Thanks!

1 Like