Correction the function of converting the date