Skip to content

Instantly share code, notes, and snippets.

@Thijzer
Created September 11, 2015 06:41
Show Gist options
  • Save Thijzer/36ef647ad2d871d44fba to your computer and use it in GitHub Desktop.
Save Thijzer/36ef647ad2d871d44fba to your computer and use it in GitHub Desktop.
// create a date
$this->frm->addDate('date', $this->record['date']);
// convert date with mysql
$date = \DateTime::createFromFormat('d/m/Y', $fields['date']->getValue());
$item['date'] = $date->format('Y-m-d').' 00:00:00';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment