Dreamweaver帮助:使用PHP / MySQL格式化日期 [英] Dreamweaver help: using PHP/MySQL formatting date

查看:96
本文介绍了Dreamweaver帮助:使用PHP / MySQL格式化日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


在一个动态的html页面上,我有一个带有日期栏的表格

hello,

On a dynamic html page I have a table with a date column

展开 | 选择 | Wrap | 行号

推荐答案

变量的确切格式(类型和内容)
What exact format (type and content) is the variable


row_resultado_viajes [''fecha'']。


如您所知,date()使用格式描述(1st parm)和整数时间(2nd parm)。


Ronald
row_resultado_viajes[''fecha''].

As you know, date() works with a format description (1st parm) and the time in integer (2nd parm).

Ronald


当该字段是MySQL DATE格式(YYYY-MM-DD)的数据库日期字段时,然后将数据库日期字段转换为整数,然后将其重新格式化为所需的输出格式,喜欢[php]

回音日期(" jm-Y",strtotime(
When that field is a database date field in MySQL DATE format (YYYY-MM-DD), then convert the database date field to integer and then reformat that to the desired output format, like[php]
echo date("j-m-Y", strtotime(


这篇关于Dreamweaver帮助:使用PHP / MySQL格式化日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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