Fixed and implemented the numToDate function