Dear friends, I am implementing a requirement on a microcontroller having a real time clock. When the controller is powered up, i capture the starting time to a static variable say begin = 20/12/2010 (ofcourse i will have 3 variables for month date and year. I want to calculate on demand, the number of days elapsed since power on. Since i am using a microcontroller, i do not have the flexibility of using the standard libraries (epoch time for example in linux). Can some one help me with this ? may be a code snippet or somestarting point would be great Cheers!