Discussion: quick question
Afficher un message
Vieux 09/05/2008, 15h15   #5
Stut
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] quick question

>>
>> Well, when I try date('d/m/y', strtotime($_POST('date')) - it seems
>> mixing day and month, I tried setlocale(LC_ALL, 'en_GB'); but it
>> didn't


If you're sure that's the format of the date, this will do it...

list($day, $month, $year) = explode('/', $thedate);
$thetimestamp = mktime(0, 0, 0, $month, $day, $year);

-Stut

--
http://stut.net/
  Réponse avec citation
 
Page generated in 0,05222 seconds with 9 queries