Re: convert date in german format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> That's because date() wants a Unix timestamp. MySQL has it's own format.
> You have two options. Option 1 is to use DATE_FORMAT() in your query to
> retrieve the date already formated. DATE_FORMAT() works similar to the PHP
> date() function. Look it up in Chapter 6 of the MySQL Manual.
> Option 2 is to use UNIX_TIMESTAMP() in your query to retrieve the MySQL date
> formatted as a Unix timestamp. You can then pass this value to the PHP
> date() function and format it like you have above.

Or option 3: strtotime()

Chris

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux