将日期转换为DB日期格式 [英] Convert Date to DB Date Format
本文介绍了将日期转换为DB日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
我的输入文字有这种日期格式:2015年5月28日晚上11:00
是有一种方法或功能可以改变格式:2015-05-28 23:00:00?
谢谢你的帮助。
Hi!
I have a input text which has this type of date format: 28 May 2015 11:00 PM
Is there a way or a function that could change the format to: 2015-05-28 23:00:00 ?
Thank you for the help.
推荐答案
看看这里: PHP:日期格式 [ ^ ]
它也可能有用:将一种日期格式转换为另一种格式用PHP [ ^ ]
Take a look here: PHP: Date Formats[^]
It might be useful too: Convert one date format into another in PHP[^]
考虑以下代码段: -
Consider the following Code segment:-
input_date = date(' d M Y h:i A');
echo
input_date = date('d M Y h:i A'); echo
这篇关于将日期转换为DB日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文