Oracle Julian day of year
If you check the TO_CHAR (datetime) documentation you get a link to "Format Models" with a comprehensive list of available formats. I guess you want this:
DDD
Day of year (1-366)
SELECT TO_CHAR(SYSDATE, 'DDD') from DUAL;