Convert a year and day-of-year code

Turn the code 2026308 (day 308 of 2026) into a real date: November 4, 2026.

What you'll make

In Excel: 2026365 becomes December 31, 2026.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesFor row 8
1LEFT(A8,4)Takes the first 4 digits: the year."2026"
21Starts counting from January.1
3RIGHT(A8,3)Takes the last 3 digits: the day of the year."308"
4DATE( … )Counts that many days into the year.November 4, 2026

Excel counts on past the end of January, through the months, to day 308.

=DATE(LEFT(A8,4),1,RIGHT(A8,3))

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own dates. Paste day codes like 2026308 into the green column of the Template tab. The dates fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Day 366 only exists in a leap year. In other years it rolls into January, so check odd codes.

Microsoft's help: DATE function