AnsweredAssumed Answered

RTC Time Functions

Question asked by Richard on Jan 17, 2012
Latest reply on Feb 22, 2012 by Richard
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.

Outcomes