I would like to select several dates in the format:
yyyydDOY
where yyyy is a 4-digit year, DOY is the day of the year (1-366), and d is the letter "d". Here is what I tried:
SQL> select to_char(sysdate, 'YYYYdDDD') from dual; TO_CHAR( -------- 20130713
Obviously, everything is wrong. The result I want to find can be found on the command line:
$ date +'%Yd%j' 2013d071
source share