Mysql datatime 利用str_to_date字符串转换为日期 进行时间段查询

Mysql中STR_TO_DATE(str,format)方法将字符串str转换为format定义格式的日期类型sql 写法如图 数据库 STR_TO_DATE("2019-01-20","%Y-%m-%d %H:%i:%s") orm 若是要作一个时间段的数字统计写法能够以下字符串 select sum(number) from test  where time > STR_TO_DATE("2
相关文章
相关标签/搜索