prorm API Reference
    Preparing search index...

    Function dateAdd

    • Add amount units of time to a date/timestamp expression. See dialect notes on dateTrunc / module doc for the general per-dialect divergence rationale; per-function notes:

      • postgres/cockroachdb: expr + INTERVAL 'n unit'.
      • redshift: DATEADD(unit, n, expr) (SQL-Server-style function, NOT interval arithmetic, despite being Postgres-derived).
      • mysql/mariadb: DATE_ADD(expr, INTERVAL n UNIT).
      • mssql/snowflake: DATEADD(unit, n, expr).
      • oracle: day-level uses plain +/- arithmetic (Oracle DATE math is in days); month/year use ADD_MONTHS; hour/minute/second are expressed as fractional-day arithmetic.
      • sqlite: datetime(expr, '+n units').
      • db2: labeled-duration arithmetic, e.g. expr + n DAYS.
      • clickhouse: ANSI expr + INTERVAL n UNIT.

      Parameters

      Returns DateTimeExpression