SQL Server Convert将float 转成日期格式

日期中存储的是20230101格式的float型数据,要将其转成日期格式方法:

convert(date,convert(varchar,convert(int,日期)),120)

先把float转成int,再把int转成varchar,再把varchar转成日期。

posted on 2023-08-14 11:29  糯米白白  阅读(248)  评论(0编辑  收藏  举报

导航