如何使用knex查询从表中 Select 特定日期范围内的行?例如,从过go 七天中 Select 行.
Knex版本:0.15.0
DB:PostgreSQL
如何使用knex查询从表中 Select 特定日期范围内的行?例如,从过go 七天中 Select 行.
Knex版本:0.15.0
DB:PostgreSQL
无论您 Select 何种查询方式,这里都有一种方法:
knex('table')
.where('createdAt', '>=', '2009-01-01T00:00:00Z')
.where('createdAt', '<', '2010-01-01T00:00:00Z')