在我的数据中,一个名为'duedate'的列为varchar(5)格式的日期以2011年7月25日的格式'20110725'存储,有没有办法可以将其转换为日期格式
我试过用
cast(duedate as datetime)
Run Code Online (Sandbox Code Playgroud)
哪个没用,然后我试图将它转换为bigint然后转换为datetime
cast( cast(duedate as bigint) as datetime)
Run Code Online (Sandbox Code Playgroud)
其中说
arithematic溢出错误
很抱歉这是混乱的varchar(50) - 拼写错误,非常感谢帮助生病尝试你们提到的事情