|
Posted by Joe Makowiec on 07/11/06 11:21
On 11 Jul 2006 in alt.php.sql, Roland Zitzke wrote:
> is it possible to teach MySQL to accept and output dates in format:
> DD.MM.YYYY
> rather than
> YYYY-MM-DD?
> I read somewhere that this can be configured in some system global
> files. What I am looking for is a method to set this in (and for) a
> particular PHP page. The rational behind it is that I would like to
> keep my code portable and not dependent on special global settings.
Output is easy:
SELECT DATE_FORMAT(Schedule.gameDate, '%W, %M %e') as dateOfGame, ...
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Input is more problematic and depends on how the date will be input.
--
Joe Makowiec
http://makowiec.org/
Email: http://makowiec.org/contact/?Joe
Navigation:
[Reply to this message]
|