Error value.toISOString is not a function
I'm using the @Neondatabase/serverless / drizzle-orm/neon-http drivers and having issue with updating a field in my db
I have this field in the schema
posted_at: timestamp("posted_at", { withTimezone: true }),
and im trying to run a patch
.set({
posted_at: sql
NOW()
})
I've tried setting it to mode string, as well as mode date, and tried setting it to new Date(), sql current_timestamp, sql now, and even tried manually doing a .toISOString, but seems no matter what combination i try i get the same error
value.toISOString is not a function 01:12:14
at PgTimestamp.mapToDriverValue
i saw some github issues with related topics but i cant figure out a combination that works
they work fine in my update fields like
updated_at: timestamp("updated_at", { withTimezone: true }).$onUpdate(
() => sqlnow()
),
just not this manual passing
any ideas? thanks!1 Reply
thats how I do it