beridius
asked on
mysql date format
is they away to convert the date format from yyyy-mm-dd to dd-mm-yyyy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mysql> SELECT DATE_FORMAT('2009-10-04 22:23:00', '%d %m %Y');
+------------------------------------------------+
| DATE_FORMAT('2009-10-04 22:23:00', '%d %m %Y') |
+------------------------------------------------+
| 04 10 2009 |
+------------------------------------------------+
1 row in set (0.00 sec)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mysql> SELECT DATE_FORMAT('2009-10-04', '%d-%m-%Y');
+---------------------------------------+
| DATE_FORMAT('2009-10-04', '%d-%m-%Y') |
+---------------------------------------+
| 04-10-2009 |
+---------------------------------------+
1 row in set (0.00 sec)
ASKER
when I update the date from a variable would I use
UPDATE DATE_FORMAT(YourDateField, "%d-%m-%Y") FROM Yourtable WHERE
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you mean to change the format as you select a date, try this:
SELECT DATE_FORMAT(YourDateField,