How to write the code in Oracle SQL
(like \'CCYYMMDD\'
into 102
)?
If someone will enter the date in the frontend, the value should return
If you want to convert an Oracle date into a Julian date, then you can use the TO_CHAR function with 'j' as the format.
SELECT TO_CHAR(TO_DATE('BC47120412', 'BCYYYYMMDD'), 'J')
FROM DUAL;
Output: 0000102
If you want to convert julian date to oracle date then use query below,
SELECT TO_DATE(102, 'J')
FROM DUAL;
Output: 04/12/4712 12:00:00 AM BC