Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save mikelietz/1141514 to your computer and use it in GitHub Desktop.

Select an option

Save mikelietz/1141514 to your computer and use it in GitHub Desktop.
// Format the date field, leaving invalid dates alone
if (strtotime($candidate->dob)) {
$candidate->dob = date("d/m/Y", strtotime($candidate->dob));
} else if (isnull($candidate->dob)) {
$candidate->dob = "MM/DD/YYYY";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment