prisma_types
prisma_types
ORM
Postgres
Studio
Optimize
Accelerate
Pulse
GuidesExamples
Search
ORM
ORM
Overview
Introduction
Prisma ORM in your stack
Databases
Beyond Prisma ORM
Prisma Schema
Overview
Data model
Introspection
PostgreSQL extensions
Prisma Client
Setup & configuration
Queries
Write your own SQL
Fields & types
Composite types
Null and undefined
Working with Json fields
Working with scalar lists
Working with compound IDs and unique constraints
Extensions
Type safety
Testing
Deployment
Observability & logging
Debugging & troubleshooting
Prisma Migrate
Getting started
Understanding Prisma Migrate
Workflows
Tools
Prisma CLI
Prisma Studio
Reference
Prisma Client API
Prisma Schema
Prisma CLI
Errors
Ask AI
Environment variables
Database features matrix
Supported databases
Connection URLs
System requirements
Preview features
More
Under the hood
Upgrade guides
Comparing Prisma ORM
Development environment
Help articles
ORM releases and maturity levels
ORM
Prisma Client
On this page
Fields & types
This section covers various special fields and types you can use with Prisma Client.
warning
BigInt fields are represented by the BigInt type (Node.js 10.4.0+ required). The following example demonstrates how to use
the BigInt type:
Serializing BigInt
Prisma Client returns records as plain JavaScript objects. If you attempt to use JSON.stringify on an object that includes a
BigInt field, you will see the following error:
Note that before Prisma v6, Bytes were represented by the Buffer type:
There currently is a bug that doesn't allow you to pass in DateTime values as strings and produces a runtime error when you do.
DateTime values need to be passed as Date objects (i.e. new Date('2024-12-04') instead of '2024-12-04').
When creating records that have fields of type DateTime, Prisma Client accepts values as Date objects adhering to the ISO
8601 standard.
await prisma.user.create({
data: {
birthDate: new Date('1998')
}
})
await prisma.user.create({
data: {
birthDate: new Date('1998-12')
}
})
await prisma.user.create({
data: {
birthDate: new Date('1998-12-24')
}
})
await prisma.user.create({
data: {
birthDate: new Date('1998-12-24T06:22:33.444Z')
}
})
Product
ORM
Studio
Optimize
Accelerate
Pulse
Pricing
Changelog
Data Platform status ↗
Resources
Docs
Ecosystem
Playground ↗
ORM Benchmarks ↗
Customer stories
Data guide
Contact us
Community
Support
Enterprise
Partners
OSS Friends
Company
About
Blog
Data DX ↗
Careers
Security & Compliance
Legal
Privacy Policy
Terms of Service
Service Level Agreement
Event Code of Conduct