Oracle & DB2 Datetime Format Converter
Oracle formats dates with model elements (`YYYY-MM-DD HH24:MI:SS`), DB2 with ISO patterns, and Teradata with its own `YYYY-MM-DDHH:MI:SS` literals. Each database interprets string literals by its NLS/dateformat settings, which is a leading source of "ORA-01843: not a valid month" style errors.
This converter renders your date-time as Oracle TIMESTAMP (with `TO_TIMESTAMP` model), Oracle ISO with timezone (`TIMESTAMP WITH TIME ZONE`), and DB2/Teradata literal forms so your SQL strings match each engine.
Oracle & DB2 Datetime Format Converter Quick Reference
| Format | Pattern / Description | Example 1 | Example 2 |
|---|---|---|---|
| Oracle Date | DD-MON-YYYY | 13-AUG-2026 | 01-JAN-2026 |
| Oracle ISO/TZ | ISO with Offset | 2026-08-13T14:30:00.000Z | 2026-01-01T00:00:00.000Z |
| IBM DB2 | yyyy-MM-dd-HH.mm.ss... | 2026-08-13-14.30.00.000000 | 2026-01-01-00.00.00.000000 |
| Teradata | yyyy-MM-dd HH:mm:ss | 2026-08-13 14:30:00 | 2026-01-01 00:00:00 |
* Examples are rendered in UTC for the fixed sample instants above.
When to Use Oracle & DB2 Datetime Format
Oracle SQL literals
Generate `TO_DATE('2026-08-13 14:30:00', 'YYYY-MM-DD HH24:MI:SS')` strings that survive any NLS session setting.
DB2 & Teradata queries
Produce engine-correct literal formats for WHERE clauses and INSERT statements without guessing the dateformat.
ETL between databases
When moving timestamps between Oracle, DB2 and Teradata, generate the canonical literal for each target.
Frequently Asked Questions
What is the Oracle date format?
Oracle uses model elements: `YYYY-MM-DD HH24:MI:SS` (e.g. `2026-08-13 14:30:00`). `HH24` = 24-hour clock; without it Oracle assumes AM/PM.
What is Oracle TIMESTAMP WITH TIME ZONE?
`TIMESTAMP(6) WITH TIME ZONE` stores the offset explicitly: `2026-08-13 14:30:00 +00:00` or with a region name. It is the Oracle type for absolute instants.
Why do I get ORA-01843: not a valid month?
The literal does not match the session NLS_DATE_FORMAT (e.g. passing `13/08/2026` when NLS expects `DD-MON-YY`). Always use an explicit `TO_DATE` format mask.
What is the DB2 timestamp format?
DB2 accepts ISO 8601-like literals: `2026-08-13-14.30.00.000000` (dashes and dots) or `2026-08-13 14:30:00` in newer versions.
Related Time Format Converters
All Format Guides
Need to Convert Between All Formats?
Use the main Time Format Converter for instant conversion across 100+ formats — epoch, ISO 8601, RFC 3339, SQL datetime, military time and more in one click.
Open Time Format Converter