Move formatting of dates into the date processing (in case of null)