you could use the mySQL DATE_FORMAT() directly in your query: SELECT DATE_FORMAT( mydatefield, '%m/%d/%Y ' ) as d_mydatefield from MyTable
At 11:23 PM 12/12/2001 +0100, you wrote: >Hi to all, > >I'm using this to get date from mySQL database: > >.. >$p_datum = $row["mydatefield"]; >$mydate = getdate($p_datum); >$month = $mydate['month']; >$mday = $mydate['mday']; >$year = $mydate['year']; > >.but I allways get 1/1/1970. > >Can anybody help me? > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]