script to calculate elapsed time between two dates