Search notes:

Oracle SQL: TO_DATE

to_date() converts a string to a date.
to_date('...', 'fmt')
to_date('...', 'fmt', 'nlsparam')
to_date('...'  default '...' on conversion error, 'fmt')
to_date('...'  default '...' on conversion error, 'fmt', 'nlsparam')

Convert a Julian day to a date

A Julian Day can be converted to a date with the 'J' format specifier:
select
   to_date(2459496, 'J') -- October 8th, 2021
from
  dual;
Oracle counts the inexsting year 0. Thus, Julian days before the Year 1 are inconsistent with other Julian days:
select
   to_date(1721424, 'J'), --  0001-01-01
   to_date(1721057, 'J')  -- -0001-12-31
from
   dual;
The following select statement returns Oracle's earliest date it can process (-4712-01-01). (Note that due to Oracle's special Year-0 counting, the first Julian day is actually -4713-01-01).
select to_date(1, 'J') from dual;

See also

The default date format string for to_date is specified with the nls_date_format setting.
The error messages
Oracle format models for conversion functions

Index