© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
2 replies
Blixkreeg

DatabaseErrorException: ERROR: column "due_date" is of type timestamp

I'm trying to use the timestamp column type and when inserting a record with a date object I get this error:

DatabaseErrorException: ERROR: column "due_date" is of type timestamp with time zone but expression is of type text; Hint: You will need to rewrite or cast the expression.
DatabaseErrorException: ERROR: column "due_date" is of type timestamp with time zone but expression is of type text; Hint: You will need to rewrite or cast the expression.


I'm creating my schema as per the developer docs but for the life of me, I cannot get the record to save because of the date.

When inserting the record I've tried { mode: "string" }, { mode: "date" } and used a
new Date()
new Date()
object, used a string, everything and nothing works.

Any ideas how I can get this working?
Screenshot_2024-04-29_at_10.36.45_AM.png
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

column is of type date but expression is of type text
Drizzle TeamDTDrizzle Team / help
16mo ago
Properly setting timestamp column
Drizzle TeamDTDrizzle Team / help
2y ago
MySQL Timestamp shows Invalid Date
Drizzle TeamDTDrizzle Team / help
2y ago
Error: No grammar type for TIMESTAMP – Error ID 4fa91e577c064e1f803c7fcc3ff4b881
Drizzle TeamDTDrizzle Team / help
7mo ago