I am trying to convert a date from yyyy-mm-dd to dd-mm-yyyy (but not in SQL); however I don't know how the date function requires a timestamp, and I can't get a timestamp from this string.
How is this possible?
Use Can Use strtotime() and date():
$originalDate = "2010-03-21";
$newDate = date("d-m-Y", strtotime($originalDate));
(see strtotime and date docs on the PHP site).
Post Your Answers
What is critical region in Operation System?
who is Best AWS Training in Noida
Who is the Best Packers And Movers in Mumbai that Get Free Quotes & Compare and Save
Who is the Best Packers and Movers in Kota
Packers And Movers Hyderabad Get Free Quotes Compare and Save
How to Validate Password Strength in PHP