I want to make date from 11-Mar to 2011-03. But I think php is thinking 11-Mar is 2012-Mar-11. How can i do it?
value : 11-Mar
expect : 2011-03
result : 2012-03 [date(strtotime('11-Mar'))]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this using the
DateTimeclass present in php.http://www.php.net/manual/en/datetime.createfromformat.php
Regards,