Skip to content

ISO 8601 Date Types #1455

Open
Open
@bchr02

Description

@bchr02

Dates are serialized as strings in ISO 8601 format when being parsed from JSON. E.g when using express.json(), or when using JSON.parse(). To INSERT into DATE columns, one could use a reviver function as mentioned here or keep the IN binds as oracledb.STRING types and wrap the VALUES in TO_UTC_TIMESTAMP_TZ(:1) but it would be nice if within bindDefs there could be a special type for dates stored as strings in ISO 8601 format that are meant for DATETIME or DATE columns. I currently do not see anything documented that allows for this behavior (explicitly or implicitly), but I believe it would be extremely beneficial. Also, the examples/date.js would benefit by providing an example using the TO_UTC_TIMESTAMP_TZ function with the IN binds as oracledb.STRING.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions