我如何在MySQL查询中更改时区
我有此查询,如何在此查询中将时区更改为印度时区
SELECT 'ENTRIES' as Module, concat(SUM(t.TotalEntry)) AS VAL
FROM fantasy.Game t
WHERE t.DateModified BETWEEN CONCAT(CURDATE(),' 00:00:01')
AND CONCAT(CURDATE(),' 10:00:00')
I have this query, how can in change the timezone to an indian timezone in this query
SELECT 'ENTRIES' as Module, concat(SUM(t.TotalEntry)) AS VAL
FROM fantasy.Game t
WHERE t.DateModified BETWEEN CONCAT(CURDATE(),' 00:00:01')
AND CONCAT(CURDATE(),' 10:00:00')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在mySQL中,convert_tz()从指定为第二个参数的时区转换为指定为第三个参数的时区的时区域后返回结果值。当参数无效时,此函数返回null。
语法:
from_tz和to_tz是时区变量,可以是数字或时区名称。
查看此链接以获取更多datail:
/a>
In MySQL the CONVERT_TZ() returns a resulting value after converting a datetime value from a time zone specified as the second argument to the time zone specified as the third argument. This function returns NULL when the arguments are invalid.
Syntax:
from_tz and to_tz are timezone variables and could be numeric or timezone name.
Look at this link for more datail:
Official MySql documentation