can somebody help me with my problem? I already figure out the problem but seems i do not now how to solve it without using explode()
, so the problem is that the string date for example '02-15-17' i want to convert it in date()
expected result (Feb 15, 2017) using strtotime()
doesn't give me a right/exact year cause of the parameter 3 which is the year it has only 2 digit in HTML5 input tag date
in chrome browser, can somebody help me to solve this problem? for the vision of my code here it is.
<?php
$user_date = '02-15-17';
echo date('M d, Y', strtotime($user_date));
?>
result:
Feb 2, 1917