更改 phpmyadmin 中的日期格式 [英] Change the date format in phpmyadmin
问题描述
我正在尝试更改 phpmyadmin 中的日期格式.我无法更改格式 我想将格式更改为 dd-mmm-yyyy.如何更改日期格式.请帮我解决它..
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..
推荐答案
您可以使用 phpMyAdmin 的 浏览器转换功能来做到这一点.
You can use phpMyAdmin's browser transformations feature to do this.
- 转到相关表格的
Structure
页面. - 点击
Actions
列中的Change
超链接相关日期/日期时间/时间戳列. - 从
Browser Transformation
中选择Text/Plain: Dateformat
下拉菜单. - 将
0,'%d-%b-%Y','local'
插入到转换选项列中. - 保存更改并返回
Browse
页面.
- Go to the
Structure
page of the relevant table. - Click on the
Change
hyperlink in theActions
column of the relavent date/datetime/timestamp column. - Chose
Text/Plain: Dateformat
from theBrowser Transformation
dropdown. - Insert
0,'%d-%b-%Y','local'
into the transformation options column. - Save the changes and go back to
Browse
page.
来自关于Text/Plain: Dateformat
转换的文档
显示 TIME
、TIMESTAMP
、DATETIME
或数字 unix 时间戳列作为格式化日期.第一个选项是将添加到时间戳的偏移量(以小时为单位)(默认值:0).使用第二个选项指定不同的日期/时间格式字符串.第三个选项确定您要查看本地日期还是 UTC 日期(使用 "local"
或 "utc"
字符串).据此,日期格式具有不同的值 - 对于 "local"
参见 PHP 的 strftime()
函数和 "utc"
的文档使用 gmdate()
函数完成.
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'sstrftime()
function and for"utc"
it is done usinggmdate()
function.
这篇关于更改 phpmyadmin 中的日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!