Hi I need to compare two different date&time. Anyone ho have any app note on this?
In what format do you have the date & time?
Hi long int. I don't want to use float.
But how are you representing the date & time in your long int?
This should get you started: http://www.8052.com/forum/read.phtml?id=69063
I have Date & Time as a string and want it in long int so I can make some artimetich on it. i.e Now + 2hour or Now + 2 day and 6 hour.
Wouldn't it be better to have it as a structure? Then you can access, for example, date_time.hour, date_time.day etc Or follow Michael Karas' approach in the thread that Graham cited, and do all your arithmetic in serial numbers - and just convert to/from days/hours/minutes etc for presentation?