How can I do a read with prisma based off time? Fo...
# orm-help
e
How can I do a read with prisma based off time? For example, I want to get all users created in the last 7 days. Or, I want to get all users created between June 11th to June 16th.
w
in graphql or using prisma client?
e
prisma client
is it the where clause or how to appropriately format datetime that you're struggling with? Sorry I thought I had an example available, but can't find it
e
An example would be really helpful, surprised they don't have anything in the docs for it. I know how to format datetime but I don't even know which property filtering/sorting to use it with
w
Copy code
prisma.yourObject.findMany({
 where: {
   createdAt: {gte: 'ISO Date String'}
  }
})
👍 1
e
thank you!
👍 1