in reply to calculate time(days)

In which format are these dates?

Maybe Date::Calc could help you.