-1

Possible Duplicate:
Mysql: Setup the format of DATETIME to 'DD-MM-YYYY HH:MM:SS' when creating a table

how to display the date in DD-MM-YYYY from the database. Where it shows only in YYYY-MM-DD I have add the date in mysql using CURRENT_TIMESTAMP(). Please give me a solution for this problem.

Community
  • 1
  • 1
jibz
  • 7
  • 2

1 Answers1

1

There is no way to change the default format, but you can specify it explicitly, like

SELECT DATE_FORMAT(`date_column_name`, '%d-%m-%Y') ...
zerkms
  • 249,484
  • 69
  • 436
  • 539