【发布时间】:2019-10-27 06:10:13
【问题描述】:
我正在尝试将秒数添加到现有时间戳以查找结束时间。 我在一个字段中有开始时间,在一个字段中有总持续时间。我怎么能加。我尝试使用 date_add 函数,但不起作用。
Select
testdate,
DATE_ADD ( testdate,CAST (testduration as INT) ) as Test_end_date
from <DBName> limit 10;
TestDate is this format= 9/14/2017 16:33:25.000000
Testduration is in seconds e.g: 144 seconds or so
它添加到日期而不是秒部分。
感谢任何帮助。
试过 Date_Add 功能,不工作。
【问题讨论】: