A date only column (no timestamp)

Fallback policy: If the dialect does not support this type natively, it will be replaced by a string type, and a CHECK constraint to enforce a valid ISO 8601 datetime format.

Example

DataTypes.DATEONLY

Hierarchy (view full)

Constructors

Properties

#dialect: undefined | AbstractDialect<object, object>
usageContext: undefined | DataTypeUseContext

Where this DataType is being used.

Methods

  • Called when a value is retrieved from the Database, and its DataType is specified. Used to normalize values from the database.

    Note: It is also possible to do an initial parsing of a Database value using AbstractDialect#registerDataTypeParser. That normalization uses the type ID from the database instead of a Sequelize Data Type to determine which parser to use, and is called before this method.

    Parameters

    • value: unknown

      The value to parse.

    Returns unknown