要求修改ACCESS数据库中一个表,包括两个时间型字段一个整型字段(表示秒),现在要求让一个时间型字段加上整型字段(秒)值付给另一个时间型字段?
数据库 database1
表结构 table1
timebegin 日期时间
timeover 日期时间
timelong 时间长度
aaa.Execute " update table1 set timeover = # " & (timebegin + timelength) & "#"错误?
数据库 database1
表结构 table1
timebegin 日期时间
timeover 日期时间
timelong 时间长度
aaa.Execute " update table1 set timeover = # " & (timebegin + timelength) & "#"错误?
我就是不知道数据库中时间值如何相加,你给的例子当然可以。我想知道
我的问题的解决方法。
用其中的dateadd函数试试
aaa.Execute " update table1 set timeover = # " & DateAdd("S", timelength, timebegin) & " #"