Deepak Guptha S
02/18/2022, 5:29 PMSELECT * FROM table1
WHERE '2011-01-01' BETWEEN table1.startdate AND table1.enddate
How I can perform this operation in Prisma ?Tyler Bell
02/18/2022, 5:49 PMconst result = await prisma.post.findMany({
where: {
AND: [
date_created: {
gte: new Date(startdate)
},
date_created: {
lte: new Date(enddate)
},
]
},
})
fyi, I don’t work for Prisma so might not be the best answer.Deepak Guptha S
02/18/2022, 5:50 PM