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
yyyy-mm-dd
dd-mm-yyyy
Use this function to convert from any format to any format
function reformatDate($date, $from_format = 'd/m/Y', $to_format = 'Y-m-d') { $date_aux = date_create_from_format($from_format, $date); return date_format($date_aux,$to_format); }