table_name 表中有字段 create_at,类型是 datetime,保存的是 UTC 时间。
下面是分组查询:
select count(*) from table_name group by date_format(`create_at`, "%Y-%m-%d");
可是这个查询的是 UTC 的时间,如何能查询用户对应地区的时间的数据?
回复 (3)
参与回复
登录后即可参与回复。登录
table_name 表中有字段 create_at,类型是 datetime,保存的是 UTC 时间。
下面是分组查询:
select count(*) from table_name group by date_format(`create_at`, "%Y-%m-%d");
可是这个查询的是 UTC 的时间,如何能查询用户对应地区的时间的数据?