Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的页面(PHP)中,我的日期格式如下:“2013 年 1 月 30 日”。我想将此格式转换为“2013-01-28”。
是否可以使用 MySQL 日期格式?
用于STR_TO_DATE将字符串转换为日期
STR_TO_DATE
SELECT DATE(STR_TO_DATE(colName, '%d-%b-%Y')) -- date datatype
或者
SELECT DATE_FORMAT(STR_TO_DATE(colName, '%d-%b-%Y'),'%Y-m-%d') -- string type
List<Object> list = new ArrayList<String>()
When I use the above line compiler gives me type mismatch error. But as I underst