Skip to content

Instantly share code, notes, and snippets.

@bferronato
Last active December 5, 2016 16:13
Show Gist options
  • Save bferronato/225fcbd0e8ee7b60495e066969d4c464 to your computer and use it in GitHub Desktop.
Save bferronato/225fcbd0e8ee7b60495e066969d4c464 to your computer and use it in GitHub Desktop.
<?php
$show_date = DateTime::createFromFormat('d/m/Y', $dateInput)->format('Y-m-d');
// Fonte:
// http://stackoverflow.com/questions/15676344/format-date-dd-mm-yyyy-to-yyyy-mm-dd-php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment