Export a date as a yyyyddd code
Turn November 4, 2026 into the text 2026308: the year, then the day of the year.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | TEXT(YEAR(A8),"0000") | Writes the year as four digits. | "2026" |
| 2 | A8-DATE(YEAR(A8),1,0) | Counts the day number in the year. | 308 |
| 3 | ,"000" | Asks for three digits, with zeros in front. | Not used yet |
| 4 | TEXT( … ) | Writes the day as three digits after the year. | "2026308" |
Part 4 works on parts 2 and 3 inside it. January 15 becomes 015, so every code has seven digits.
=TEXT(YEAR(A8),"0000")&TEXT(A8-DATE(YEAR(A8),1,0),"000")How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up examples with the formula already in.
- Use your own dates. Paste real dates with no time into the green column of the Template tab. The codes fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Only use this code where the system you send to asks for yyyyddd. People won't read it as a date.
Microsoft's help: TEXT function
OTHER ROUTES YOU MIGHT LIKE

Create a six-digit mmddyy date field
November 4, 2026 → 110426
Get the template →
Create a six-digit ddmmyy date field
November 4, 2026 → 041126
Get the template →
Create a six-digit yymmdd date field
November 4, 2026 → 261104
Get the template →
Show a letter date as November 5, 2026
11/5/2026 → November 5, 2026
Take this route →