Skip to content

Instantly share code, notes, and snippets.

@Clorith
Created August 23, 2013 12:45
Show Gist options
  • Save Clorith/6318944 to your computer and use it in GitHub Desktop.
Save Clorith/6318944 to your computer and use it in GitHub Desktop.
$fetched = '21082013';
date_default_timezone_set( 'UTC' );
$date = DateTime::createFromFormat( 'dmY', $fetched );
echo $date->format( 'Y-m-d' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment