Created
February 3, 2017 01:19
-
-
Save danemorgan/ce2874552ab8b55c44f0f02a371920a8 to your computer and use it in GitHub Desktop.
PHP date formats for my preferred formats
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
$date = date( 'Y-m-d', $timestamp ); // 2017-01-01 | |
$time = date( 'H:i', $timestamp); // 01:00 / 13:00 | |
$date_time = date( 'Y-m-d H:i', $timestamp ); // 2017-01-01 01:00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment