Suppose I have table in Postgres SQL with prisma.
// Prisma Model
model my_table {
comment String @db.VarChar(255)
date DateTime @db.Timestamp(6) // Stored as Now() in sql
}
After insert into my table I have. (the date is stored with no timezone)
// SQL DB Table
| comment | date |
| -------- | -------------------------- |
| Hello | 2022-08-04 08:16:32.716904 |
I want to query here
// Prisma Query
const rows = await this.prismaClient.my_table.findMany({
where: {
date: new Date('2022-08-04T08:16:32.716904')
},
};
But for some reason I get back no records at all
I have also tried with:
new Date('2022-08-04T08:16:32.716904Z')
new Date('2022-08-04T08:16:32.716Z')
new Date('2022-08-04T08:16:32')
new Date('2022-08-04T08:16:32.716Z').toUTCString()
new Date('2022-08-04T08:16:32.716Z').toISOString()
but none seems to work, any suggestions or help will be appreciated.