Closed EugeneGohh closed 1 year ago
The filter string gets directly transferred to Prisma, therefore you should be able to simply use the date as a string directly, e.g.:
const filterBuilder = new FilterBuilder<User>()
.addFilter('createdAt', FilterOperationType.gte, '2023-05-30');
const filter = filterBuilder.toFilter();
const queryString = filterBuilder.toQueryString();
I don't know how Prisma handles those filters by date exactly, but alternatively if you only want a single day, you can also just filter using gte: '2023-05-30T00:00:00.000Z'
and lt: '2023-05-31T00:00:00.000Z'
as well if the example above doesn't work for this.
The object response:
Are there any workarounds where I only want to filter by date only (exclude time)? Meaning only filter by 2023-05-30.