Hello guys,
I'm having difficulties with finding the days difference between 2 time-stamps.
Each time stamp is given by a struct:
unsigned short year; (2 bytes)
unsigned char month; (1 byte)
unsigned char day;
unsigned char hour;
unsigned char min;
unsigned char sec;
Given two time-stamps, how can I know what is the days difference between these two? (considering 28/29/30/31 monthes as you're familiar with).
For example, days difference between 22.1.09 and 23.1.09 is 1 day, no matter what is the hours/mins/sec/ differences.
Thank you very much for any help.
I'm having difficulties with finding the days difference between 2 time-stamps.
Each time stamp is given by a struct:
unsigned short year; (2 bytes)
unsigned char month; (1 byte)
unsigned char day;
unsigned char hour;
unsigned char min;
unsigned char sec;
Given two time-stamps, how can I know what is the days difference between these two? (considering 28/29/30/31 monthes as you're familiar with).
For example, days difference between 22.1.09 and 23.1.09 is 1 day, no matter what is the hours/mins/sec/ differences.
Thank you very much for any help.