[SalesForce] how to convert the number of days of year into Date in salesforce

I'm stuck with a requirement here.
I have a Julian date of the format "115090".
Here.. 1 - denotes the century i.e 20th Century. 
15 - denotes the year of the century i.e. 2015. 
(Until this part I'm able to convert the YEAR part of the Standard Salesforce DATE) 
090 - denotes the NUMBER of days for the year 2015. 
(090 - 31 days of Jan + 28 Days of FEB + 31 Days of Mar)
So , Typically 115090 should return 31-MAR-2015 or 31/03/2015. 

All I'm able to get is the YEAR of the DATE 

   BEGINS(Alert_Date__c , "1"),
   2000 + VALUE(MID(Alert_Date__c,2,2)),NULL

I'm Not able to convert the number of days of the year i.e. 090 to 31/03.
If am not wrong , in no. of days, i have to check for LEAP year as well.
please provide some assistance. 

Best Answer

You know the year so can create a DATE for Jan 1st and then add your day offset. Using your example you would create the date using DATE(2015, 1, 1) and then add 89 (90 - 1) days.

DATE(theYear, 1, 1) + (numberOfDays - 1)

You don't need to handle leap years using this approach.