in reply to Calculate Time Range

You can find useful informations in this thread (Date difference?).