我现在有一个表
ftime miao
20060801123428 674
我现在要把两个数据加起来产生一个新字段怎么搞注意ftime字段的格式是2006年8月1号12点34分28秒,我现在加了674秒后要按60进1.
我表达不清..不知道大家听的懂不啊?
ftime miao
20060801123428 674
我现在要把两个数据加起来产生一个新字段怎么搞注意ftime字段的格式是2006年8月1号12点34分28秒,我现在加了674秒后要按60进1.
我表达不清..不知道大家听的懂不啊?
from tablename
from tablename
没有直接将20060801123428转换为 datetime型的方法.
declare @miao int
set @ftime='20060801123428'
set @miao=674select dateadd(ss,@miao,left(@ftime,4)+'-'+ substring(@ftime,5,2)+'-'+substring(@ftime,7,2)+' '+substring(@ftime,9,2)+':'+substring(@ftime,11,2)+':'+substring(@ftime,13,2))
from tablename