This question already has an answer here:
- How to reformat date in PHP? 9 answers
How to change format of date string using PHP?
From: 06/16/2010
To: 2010-06-16
</div>
This question already has an answer here:
How to change format of date string using PHP?
From: 06/16/2010
To: 2010-06-16
</div>
$date = "06/16/2010";
echo date('Y-m-d', strtotime($date)); // outputs 2010-06-16
Using the strtotime function.