在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"
,请参见PHPstrftime()
函数的文档,对于"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屋!