© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
14 replies
juanvilladev

Timestamp from Postgres returns date object despite schema using string mode?

Hello team, I'm confused if this is a bug because I haven't seen any other threads about it.

When I define my timestamp columns like this:
  effectiveDate: timestamp("effective_date", { withTimezone: true, mode: 'string' }).notNull(),
  effectiveDate: timestamp("effective_date", { withTimezone: true, mode: 'string' }).notNull(),


How come the return type of the column when I fetch data says string, however when I log the value or use it anywhere, it's actually a JS date object?

Is this a known issue?
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

Changing postgres timestamp mode (string -> date) isn't reflected in migrations
Drizzle TeamDTDrizzle Team / help
13mo ago
When using Postgres and timestamp, what does the mode string or date actually do?
Drizzle TeamDTDrizzle Team / help
3y ago
Postgres.js type error string/date
Drizzle TeamDTDrizzle Team / help
2y ago
Greater than comparisons with timestamp mode string
Drizzle TeamDTDrizzle Team / help
15mo ago