Help - Search - Member List - Calendar
Full Version: date en PHP ?
OpenSpace > Zone Ordinateurs > Programmation
joez
qq a un script pour retrouver en PHP une date systeme a partir d'uen date du type 21-05-02 ?



thx
Darhf
J'ai fait ça pour mon forum, ça convertit un datetime mysql en timestamp :



CODE


function nix_date($entry){

list($fulldate,$time)=explode(" ",$entry);

list($year,$month,$day)=explode("-",$fulldate);

list($hour,$minute,$second)=explode(":",$time);

$ret=mktime($hour,$minute,$second,$month,$day,$year);

return $ret;

}





wala smile.gif
Kinou
oula lol



mktime() va etre plus simple wink.gif
Darhf
Ben il y est le mktime() !
Kinou
arf j'avais pas fait gaffe



autant pr moi smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.