I have some tables with DATETIME in it.
They have the std format %Y-%m-%d %H:%i:%s
I need them to be in %d.%m.%Y %H:%i format.
I tried to fix it with the server variable "datetime_format".
After reading a lot in mysql doc I found out that:
datetime_formathttp://dev.mysql.com/doc/refman/5.0/...variables.html
This variable is unused.
So Im using
Expand|Select|Wrap|Line Numbers
- DATE_FORMAT(date,'%d.%m.%Y %H:%i') //on SELECT
- STR_TO_DATE(insert,'%Y-%m-%d %H:%i:%s') //on INSERT
After sleeping a night over it I had an idea... Is it possible to write some INSERT/SELECT/UPDATE/ trigger that changes format on every field that is DATETIME?
Or does someone have another idea?