John Riker

John Riker

  • NA
  • 85
  • 16k

Date/Time calcuations not working

Nov 18 2020 4:58 PM
Not sure if it's because it hit a day but I have a calculation:
 
((DateTime.Now - lastdownloaded).Hours > 4)
 
It's returning 0
 
Used to work.  The values right now are 
 
Now: 11/18/2020 4:51:50 PM  
lastdownloaded 11/17/2020 4:40:38 PM
 
It comes out to: 1.00:12:18.1796374
 
Shouldn't this be 24 hours or something?  Sounds like it's literally taking the hours value on the subtraction and not the total hours between the two values.  Any clarity on what this is doing?  Also how do I get it to return what I'm looking for in other words the total hours between the two date/times?
 
Thanks.
 
JR 

Answers (7)