如何将日期从一种格式转换为另一种格式 [英] How to convert date from one format to another
本文介绍了如何将日期从一种格式转换为另一种格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Excel工作表03-Dec-10中将此格式的日期设置为。所以它在插入数据库时不兼容。如何将日期转换为可接受的格式。
Im having the date in this format in a Excel worksheet 03-Dec-10. So its not compatible while inserting it into the database. How to convert the date to the acceptable format.
专家请帮助
推荐答案
$input = '03-Dec-10';
$date = date('Ymd', strtotime($input));
这篇关于如何将日期从一种格式转换为另一种格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文