gpt4 book ai didi

MySQL:获取时间戳之间的差异

转载 作者:行者123 更新时间:2023-11-29 02:36:11 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
MySQL: how to get the difference between two timestamps in seconds

如何获得两个时间戳之间的秒数(或任何其他单位)差异?如果我使用 select NOW() - '2012-01-01 00:00:00' 我得到 20110121168303 这是错误的。

我最喜欢的解决方案

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timestampdiff

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com