Thread: quick question
View Single Post

  #5 (permalink)  
Old 05-09-2008
Stut
 
Posts: n/a
Default 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/
Reply With Quote