We will show, how to change date format in php code. If you want to change the date format and save into mysql database. You can use our php code or script. You can use following php functions.
how to change date format in php
Let say you are getting date in yyyy-mm-dd format and you want to convert that into dd-mm-yyyy format and save into database. so you can use following function.
$timestamp = strtotime(your date variable); $new_date = date('d-m-Y', $timestamp); // or use can following code $new_date = date('d-m-Y', strtotime(your date variable)); // or use can following code strftime ($time, '%d %m %Y')
Thanks in support of sharing such a nice idea, piece of
writing is nice, thats why i have read it completely
Hi! Would you mind if I share your blog with my facebook group?
There’s a lot of people that I think would really enjoy your content.
Please let me know. Thanks
Sure…you can share my blog content with your friends and facebook page..