更新时间:2022-11-01 13:14:30
您不能将整数值直接转换为日期,但可以先将其转换为日期时间,然后再转换为日期类型
You can't convert an integer value straight to a date but you can first it to a datetime then to a date type
select cast(40835 as datetime)
然后转换为日期(SQL 2008)
and then convert to a date (SQL 2008)
select cast(cast(40835 as datetime) as date)
干杯