Created
May 10, 2017 12:24
-
-
Save devpilot/d89a79c4be98e1b4c73900e72105dae5 to your computer and use it in GitHub Desktop.
extract date from js date
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 | |
$jstime = "Mon Mar 20 2017 11:30:05 GMT+0530 (India Standard Time)"; | |
$t = substr( $jstime, 0, strpos($jstime, '(') ); | |
echo date( 'Y-m-d', strtotime($t) ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment