We begin by setting a year and our working day number of the year in the variables __Year and __DayNoOfYear, respectively. We then create a variable to hold a temporary __Calendar table and add a column to this table, __DayNoOfYear, which holds the sequential day number of the year. With this table, we can then essentially lookup our desired date by filtering the table down to the single row that equals our current working __DayNoOfYear.
Finally, we perform a quick check to ensure that we matched a row. If so, we return our __DateOfYear variable, otherwise we return blank (BLANK).