On this page
Two different "julian dates"
In business, a julian date usually means an ordinal date: the year and the day of the year, like 26319 for the 319th day of 2026 (November 15). It has nothing to do with the Julian calendar. In astronomy, the Julian Day (JD) is a running count of days since 4713 BC, used to compare observations: 2461359.5 is November 15, 2026 at 00:00 UTC. The Modified Julian Day (MJD) is JD minus 2,400,000.5.
Julian date codes on food, eggs and products
| Where | Usual format | Example for Nov 15, 2026 |
|---|---|---|
| Egg cartons (US pack date) | 3 digit day of year | 319 |
| Canned food, beer, snacks | Often 4 or 5 digits inside a longer lot code | 6319 or 26319 |
| Manufacturing, military supply | 5 digit YYDDD (sometimes YDDD) | 26319 |
| JD Edwards / Oracle | 6 digit CYYDDD | 126319 |
| Mainframes, ISO 8601 ordinal dates | 7 digit YYYYDDD (2026-319) | 2026319 |
Lot codes often add plant or line numbers before or after the date; find the digits that change daily. A code shows when a product was packed, not always its best-before date.
Advertisement
Excel formulas
With a date in A1 (or a code in A1 as text):
| You want | Formula |
|---|---|
| Date to 5 digit YYDDD | =TEXT(A1,"yy")&TEXT(A1-DATE(YEAR(A1),1,0),"000") |
| Date to 7 digit YYYYDDD | =YEAR(A1)&TEXT(A1-DATE(YEAR(A1),1,0),"000") |
| 5 digit YYDDD to date | =DATE(IF(LEFT(A1,2)*1<50,2000,1900)+LEFT(A1,2),1,RIGHT(A1,3)) |
| JDE CYYDDD to date | =DATE(1900+LEFT(A1,LEN(A1)-3),1,RIGHT(A1,3)) |
| Date to Julian Day (00:00 UTC) | =A1+2415018.5 |
Format the result cell as a date where the formula returns a date.
Day of year chart
| Date | Day number (normal year) | Day number (leap year) |
|---|---|---|
| Jan 1 | 001 | 001 |
| Feb 1 | 032 | 032 |
| Mar 1 | 060 | 061 |
| Apr 1 | 091 | 092 |
| May 1 | 121 | 122 |
| Jun 1 | 152 | 153 |
| Jul 1 | 182 | 183 |
| Aug 1 | 213 | 214 |
| Sep 1 | 244 | 245 |
| Oct 1 | 274 | 275 |
| Nov 1 | 305 | 306 |
| Dec 1 | 335 | 336 |
Leap years (2024, 2028) have 366 days, so from March 1 every day number is one higher.
Summary
Pick a date to get its 3, 4, 5 and 7 digit julian codes, the JDE format and the astronomical Julian Day, or type a code to get the calendar date back; the Excel formulas do the same in a spreadsheet. Converting Japanese dates too? Use the Japanese era converter.