0
我有减去从到期时间拿出数天的原购买时下面的查询减去:MySQL的 - 截断日期/时间,相互
select date(expires_dtime) - date(original_purchase_dtime)
from sl_player_subscription
where player_uuid = '9c61411c-54b4-45bd-8d07-264b1c2e4249'
player_uuid that = '9c61411c-54b4-45bd-8d07-264b1c2e4249'
有一种原始的购买的2013-03-06 11:36:46
时间和2013-04-05 12:36:46.
到期时间我想输出改为“30”,这是购买时间和到期时间之间的天数,而是输出为99。有什么建议?
你尝试'DATEDIFF'功能? https://dev.mysql.com/doc/refman/5.5/zh-TW/date-and-time-functions.html#function_datediff – 2013-03-06 20:42:50
我现在做了。非常感谢你! – Americo 2013-03-06 20:44:10
欢迎您:) – 2013-03-06 20:45:24