Question
RTC Time Functions
Posted on January 17, 2012 at 17:27
Hi
I need to work out the difference in days between 2 dates, what is the simplest way to do this? the only way I can think is work out if its a leap year or not, and put in the days per month etc. but this seems like re-inventing the wheel.Having looked at how PC compilers do this, most functions I've seen work in the seconds since a specific date/time manner, so its easy to perform calculations like this, but the STM32F103 RTC seems to use BCD instead, so I can't think of a way round this apart from hard coding. #rtcc-time-date