<?php

$date = DateTime::createFromFormat('d/m/Y', '31/10/2014');
echo $date->format('Y-m-d');

//https://pt.stackoverflow.com/q/40262/101