Correcting date format error