Wrapping retrieved dates in formatting function