convertDate now returns the entire function dateToString