Format valid from and valid to dates in correct format
Reduce function visibility