I have a file that I receive from another company. In it there are dates in this format:

2004001
or
2004294

The 2004 is the year, obviously, but the next 3 digits give me the month & day.

001 = 1/1
002 = 1/2
003 = 1/3
...
059 = 2/28
060 = 2/29 in a leap year, but 3/1 in a regular year
061 = 3/1 in a leap year, but 3/2 in a regular year

and so on.

I need to be able to convert the date I receive into a date that looks like this:
YYYYMMDD or 20041130

Any suggestions?

Thanks!