Last active
December 16, 2015 16:49
-
-
Save simonpioli/5466169 to your computer and use it in GitHub Desktop.
mySQL Date Format in PHP. Because I'm fed up of Googling it all the time!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//To mySQL Format | |
date("Y-m-d H:i:s", $datetime); | |
//Back to legible | |
date("d/m/Y", strtotime($datetime)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment