在phpmyadmin中更改日期格式 [英] Change the date format in phpmyadmin

查看:186
本文介绍了在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 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.

摘自有关Text/Plain: Dateformat转换的文档

显示TIMETIMESTAMPDATETIME或数字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's strftime() function and for "utc" it is done using gmdate() function.

这篇关于在phpmyadmin中更改日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆