Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使用以下查询,它未能将秒数添加到时间戳值
select DATE_ADD('2012-02-27 00:00:00', INTERVAL 3600 second) as new_time
输出显示为
它似乎适用于 sql fiddle。您在 SQL Fiddle 上测试的原始代码
试试这个,
SELECT DATE_ADD(CAST('2012-02-27 00:00:00' AS DATETIME), INTERVAL 3600 second) as new_time