mysql,select,query,sql >mysql / query >---------------------------------------------------------------------- > >I have a DATETIME column type with format YYYY-MM-DD and I'd like to have >format DD-MM-YYYY > >what do I have to do ?
Does it matter in what format it is in the database? you can select the date using DATE_FORMAT(date,format) more on manual page http://www.mysql.com/doc/D/a/Date_and_time_functions.html using that you get the output in what format you want to DATE_FORMAT( <datetimecolumn>, %d-%m-%Y ) should output what you want. If it matters in what format it is in the database you cannot use DATETIME field but CHAR,VARCHAR,TEXT but you lose the simple system of setting the date with just calling NOW(). JAri Mäkelä --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php