corrected the errors while reading the date