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.
您如何将 MySQL 与 YYWW 一起使用而不是 YYYYWW?
我的领域是这样的:
wYYWW, for example w1310, w1506等等。
wYYWW, for example w1310, w1506
%x并且%X似乎需要4位数字,因此它不起作用。
%x
%X
有没有办法解决这个问题?
将您需要的字符填充到字符串中怎么样?像这样的东西:
select str_to_date(insert(col, 1, 1, '20'), '%X%u')