Fixed error in conversion from timestamp to date.