But I'm not sure how to make nested if states in my c-program that would produce the right answer...
Convert them both to UNIX epoch time and subtract the difference.
UNIX Epoch time is the total number of seconds for a date since 1 January 1970 00:00:00.0
Once you've got the number of seconds, you divide that difference by the number of seconds in a day (which is 24 hours * 60 minutes * 60 seconds = 86400 seconds).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With