- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$data = '20/04/2013';
echo date('Y-m-d', strtotime($data));
$data = '04/20/2013';
echo date('Y-m-d', strtotime($data));
$data = '2013-10-12';
echo date('d/m/Y', strtotime($data));