SQL 将String转为Date

如题所述

将一种数据类型的表达式显式转换为另一种数据类型的表达式。cast

convert
提供相似的功能。
cast
(
expression
as
类型[长度])
如:cast('2005-05-01'
as
datetime)
convert
(
data_type
[
(
length
)
]
,
expression
[
,
style
]
)
如:convert(datetime,'2005-05-01')
温馨提示:答案为网友推荐,仅供参考
相似回答