请教db2的timestampdiff函数计算天数差不对的问题
1个回答
展开全部
1. 不够3天
values TIMESTAMPDIFF(16,CHAR(TIMESTAMP('2001-09-29-11.25.42.483219')-TIMESTAMP('2001-09-26-12.07.58.065497')))
1
-----------
2
1 record(s) selected.
2. 够3天
values TIMESTAMPDIFF(16,CHAR(TIMESTAMP('2001-09-29-12.07.58.483219')-TIMESTAMP('2001-09-26-12.07.58.065497')))
1
-----------
3
1 record(s) selected.
values TIMESTAMPDIFF(16,CHAR(TIMESTAMP('2001-09-29-11.25.42.483219')-TIMESTAMP('2001-09-26-12.07.58.065497')))
1
-----------
2
1 record(s) selected.
2. 够3天
values TIMESTAMPDIFF(16,CHAR(TIMESTAMP('2001-09-29-12.07.58.483219')-TIMESTAMP('2001-09-26-12.07.58.065497')))
1
-----------
3
1 record(s) selected.
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询