Help to generate date from day of the year

Hi

I want to convert the day of the year(yyyyddd) to date in mmddyy format
Example:
input is 2005029 --------> 29th day of 2005
I have to get the output as 01292005 ---> jan 29th 2005
I've to do this in K-Shell

There were threads that dealt with coverting date to day of the year but I could get any information for converting day of the year to date.

Could anyone please help me in this

Thanks in advance....

With gnu date,

-bash-3.1$ str=2005029
-bash-3.1$ yr=$(echo $str | cut -c3-4)
-bash-3.1$ dd=$(echo $str | cut -c6-7)
-bash-3.1$ echo $yr   
05
-bash-3.1$ echo $dd
29
-bash-3.1$ date -d "01/01/${yr} +${dd} days -1 day"
Sat Jan 29 00:00:00 CET 2005
-bash-3.1$ 

Thanks alot ... :b:
It was a great help :smiley:

There's no need for an external command (cut):

str=2005329
yr=${str%???}
dd=${str#????}