Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the date format in phpmyadmin

Tags:

phpmyadmin

I m trying to change the date format in phpmyadmin. I m unable to change the format I want to change the format to dd-mmm-yyyy. How can I change the date format. Please help me with it..

like image 616
user3377635 Avatar asked Apr 03 '14 03:04

user3377635


1 Answers

You can use phpMyAdmin's browser transformations feature to do this.

  • Go to the Structure page of the relevant table.
  • Click on the Change hyperlink in the Actions column of the relavent date/datetime/timestamp column.
  • Chose Text/Plain: Dateformat from the Browser Transformation dropdown.
  • Insert 0,'%d-%b-%Y','local' into the transformation options column.
  • Save the changes and go back to Browse page.

From the documentation on Text/Plain: Dateformat transformation

Displays a TIME, TIMESTAMP, DATETIME or numeric unix timestamp column as formatted date. The first option is the offset (in hours) which will be added to the timestamp (default: 0). Use second option to specify a different date/time format string. Third option determines whether you want to see local date or UTC one (use "local" or "utc" strings) for that. According to that, date format has different value - for "local" see the documentation for PHP's strftime() function and for "utc" it is done using gmdate() function.

like image 50
Madhura Jayaratne Avatar answered Sep 20 '22 19:09

Madhura Jayaratne