Antonio posted a 2nd link that talks about the 24 hour problem.
Dave just added one line of code.
http://www.dostips.com/forum/viewtopic.php?f=3&t=6271What would be the best solution if I start the process before midnight and when time changes from 23:xx:xx to 00:xx:00 to have a correct time difference? Maybe adding 24 to hours? Or maybe adding dates to start time and end time?
Saso
Yes, assuming your process takes less than 24 hours to complete, then all you need to do is conditionally at 24 hours if elapsed is less than 0.
if %elapsed% lss 0 set /a elapsed+=24*60*60*100
Dave Benham