sqlsever 将字符串格式转换成日期格式

SELECT CONVERT(DATETIME, '20241009', 112) AS ConvertedDate;

SELECT CAST('20241009' AS DATETIME) AS ConvertedDate;

 

posted @ 2024-10-17 11:06  血月葬花魂  阅读(82)  评论(0编辑  收藏  举报