Added convert date fn for recording dates