Created
January 6, 2017 19:28
-
-
Save YurePereira/d0f39103a36a5dccc93db143d5d6aba0 to your computer and use it in GitHub Desktop.
Especificando sua própria date na instanciação da classe DateTime.
This file contains hidden or 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 | |
| $myDateTime = new DateTime('2000-10-12 09:01:10'); | |
| echo $myDateTime->format('d-m-Y') . PHP_EOL;//12-10-2000 | |
| echo $myDateTime->format('d-m-Y H:i:s');//12-10-2000 09:01:10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment