What is Julian date format?
In Oracle a date can be formatted into Julian format which will be a number and known as Julian Day. The Julian number will be calculated by counting the number of days from 1st of January 4712 BC to the date.
SQL> SELECT TO_CHAR(sysdate,'J') FROM DUAL;
SQL> select to_date (2456050,'J') from dual;
Now we will discuss about to generate random number between a period using Julian and DBMS_RANDOM function.
In below example I have generated a random date between 01-01-2010 and 01-01-2012. You can change the dates depends on the requirement in below mentioned example
SQL> SELECT TO_DATE(TRUNC(DBMS_RANDOM.VALUE(
FROM DUAL ;