Revert code for getting and setting date as formatted string.