Format startdate and enddate as expected