ensure all datetimes in proper format