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

查看:22
本文介绍了更改 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天全站免登陆