itDateTime

Accepts a combined date and time. The date and time parts are separated by a single space or by T (ISO 8601 uppercase only; lowercase t is not accepted).

Separator priority

T is tried first. If a T appears before the first space (or there is no space), T is used as the separator. This correctly handles inputs such as 2026-03-25T2:30 PM, where the time part itself contains a space.

Date part

Follows the same rules as itDate: compact, ISO, and locale fallback formats are all accepted.

Time part

Follows the same rules as itTime: hh:mm, hh:mm:ss, fractional seconds (1–6 digits), and AM/PM are all accepted. The SQL output is always 24-hour.

Examples

2026-03-25 09:30:00
2026-03-25T09:30:00
25/03/2026 09:30
2026-03-25T2:30 PM
25032026 0930

Values[]

The locale date string followed by a space and the 24-hour time in hh:mm:ss[.fff] format.

2026-03-25 09:30:00.500   →   Values[0]: 25-03-2026 09:30:00.500  (pt-PT)

SQLValues[]

The SQL datetime literal depends on the dialect. See SQL dialects for the full format table.

2026-03-25 09:30:00 →
  sqlElevateDB, sqlPostgreSQL:  TIMESTAMP '2026-03-25 09:30:00'
  sqlFirebird:                  TIMESTAMP '2026-03-25 09:30:00'
  sqlMySQL, sqlDBISAM,
  sqlMSSQLServer, sqlSQLite:    '2026-03-25 09:30:00'
  sqlOracle:                    TO_TIMESTAMP('2026-03-25 09:30:00','YYYY-MM-DD HH24:MI:SS')
  sqlAccess:                    #2026-03-25 09:30:00#  (ms dropped)
  sqlBDEParadox:                "25.03.2026 09:30:00"  (ms dropped)

When milliseconds are non-zero, Firebird uses four fractional digits representing ten-thousandths of a second (ms × 10), e.g. 500 ms → .5000. All other dialects that support sub-second precision use three digits (milliseconds). sqlAccess and sqlBDEParadox drop milliseconds entirely.

Range

Input: 2026-01-01 00:00~2026-12-31 23:59:59
  →   otRange
  →   BETWEEN TIMESTAMP '2026-01-01 00:00:00' AND TIMESTAMP '2026-12-31 23:59:59'  (sqlElevateDB)

The left datetime must not be later than the right datetime; otherwise ERR_INVALID_RANGE is returned.

(C) 2026 Easygate, Lda