I would like to calculate hours between two dates. Any ideas out there? Anything will be appreciated. I have tried a few different ways, I don't know if difftime is the answer but I can't seems to get help anywhere relating to difftime
I would like to calculate hours between two dates. Any ideas out there? Anything will be appreciated. I have tried a few different ways, I don't know if difftime is the answer but I can't seems to get help anywhere relating to difftime
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
You can convert date A into a time_t value (seconds passed since 00:00:00 on January 1, 1970) and do the same with date B. Next use difftime()
In order to convert a certain date into an above mentioned time_t you will need a "struct tm" and the function mktime()
Thank you