Postgres ::date not working on Custom Query

Try this instead of casting to date: TO_CHAR(created_at, 'YYYY-MM-DD')

Knex handles dates weirdly. Refer this: Timestamp Column Converted to UTC In Wappler

1 Like