Convert date to Julian format
On the left of the ampersand, we generate the year value. We do this by subtracting the last day of the previous year from the date we are working with. Because dates are just serial numbers, this will give us the “nth” day of year. To get the last day of year of the previous year, we use the DATE function. Now we need to pad the day value with zeros....