How to Convert 7 Digit Julian Date to Calendar Date in Excel (3 Ways)

Often, food manufacturers, pharmaceutical companies, and different other sectors use the Julian date format in their products. But this date format is not practical these days. People find it hard to understand as they are used to the Gregorian Calendar format only. In this article, we’ll show you the easiest ways to convert 7 digit Julian Date to Calendar Date in Excel.

To illustrate, we’re going to use a sample dataset as an example. For instance, the following dataset represents the Product, Dispatch Date in JLD (Julian Date) format of a company.

convert 7 digit julian date to calendar date in excel


Introduction to 7 Digit Julian Date Format

The date format which uses the combination of a year and the number of days since the start of that year is known as Julian Date format. In the 7 Digits Julian date format, the first 4 digits refer to the year and the last 3 digits are the total number of days from the beginning of that year.


How to Convert 7 Digit Julian Date to Calendar Date in Excel: 3 Ways

1. Convert 7 Digit Julian Date to Calendar Date with Combination of DATE, LEFT & RIGHT Functions in Excel

Excel provides many functions and we use them for performing numerous operations. In this method, we’ll apply the DATE, LEFT & RIGHT functions. The DATE function generates a Gregorian calendar date. The arguments for the function include year, month, and day respectively. The LEFT function generates the specified number of characters from the start while The RIGHT function generates the specified number of characters from the end of a string. Therefore, follow the steps given below to convert Julian date to a calendar date in Excel.

STEPS:

  • First, select cell D5 and type the formula.
=DATE(LEFT(C5,4),1,RIGHT(C5,3))
  • Then, press Enter.

Convert 7 Digit Julian Date to Calendar Date with Combination of DATE, LEFT & RIGHT Functions in Excel

Here, the RIGHT function returns 3 characters from the end of the C5 cell value and the LEFT function returns 4 characters from the beginning. Next, the DATE function converts them to calendar date format and returns the accurate date.

  • Use the AutoFill tool to fill the series with the formula.

Read More: How to Convert Date to Julian Date in Excel


2. Combine Excel DATE, MOD & INT Functions to Convert 7 Digit Julian Date to Calendar Date

Additionally, we can create a formula with the DATE, MOD & INT functions for converting the Julian Date. We use the MOD function to generate the remainder when a divisor divides a number. The INT function rounds a number to generate the nearest integer value. So, learn the below process to perform the task.

STEPS:

  • Select cell D5 and type the formula.
=DATE(INT(C5/10^3),1,MOD(C5,INT(C5/10^3)))
  • Press Enter.

Combine Excel DATE, MOD & INT Functions to Convert 7 Digit Julian Date to Calendar Date

The DATE function converts the arguments into the year, month, and day format. The INT function generates the nearest integer value after C5 is divided by 1000. The MOD function generates the remainder when C5 is again divided by that nearest integer value.

  • Complete the rest with the AutoFill.

Read More: How to Convert Date to Text Month in Excel


3. Apply VBA for Converting 7 Digit Julian Date to Calendar Date in Excel

We can use a VBA code to perform the conversion. Hence, follow the process given below to convert Julian date to a calendar date.

STEPS:

  • Select Visual Basic from the Developer tab at first.

Apply VBA for Converting 7 Digit Julian Date to Calendar Date in Excel

  • As a result, the Visual Basic window will pop out.
  • Now, select the Module under the Insert tab.

Apply VBA for Converting 7 Digit Julian Date to Calendar Date in Excel

  • The Module window will pop up.
  • Afterward, copy the following code and paste it into the Module window.
Function JLDtoCD(JLD As String) As Long
Dim Year As Integer
Dim Day As Integer
Dim CD As Long
Year = CInt(Left(JLD, 4))
Day = CInt(Right(JLD, 3))
CD = DateSerial(Year, 1, Day)
JLDtoCD = CD
End Function

Apply VBA for Converting 7 Digit Julian Date to Calendar Date in Excel

  • Then, close the Visual Basic window.
  • Select cell D5 and type the formula.
=JLDtoCD(C5)

  • Press Enter.
  • Apply the AutoFill tool to convert the rest.

Read More: How to Convert Date to Text YYYYMMDD


Download Practice Workbook

Download the following workbook to practice by yourself.


Conclusion

Henceforth, you will be able to convert 7 digit Julian Date to calendar date in Excel with the above-described methods. Keep using them and let us know if you have any more ways to do the task. Don’t forget to drop comments, suggestions, or queries if you have any in the comment section below.


Related Articles


<< Go Back to Change Date Format | Date Format | Number Format | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Aung Shine
Aung Shine

Aung Shine completed his bachelor’s in Electrical and Electronics Engineering from Bangladesh University of Engineering and Technology. It has been almost 2 years since he joined SOFTEKO and actively working on the ExcelDemy project. Currently he works as a Team Leader where he guides his team members to create technical content. He has published 150+ articles and reviewed 50+ articles. He has also solved various user problems before. He has interests in Data Analysis, Power Query, Advanced Excel,... Read Full Bio

3 Comments
  1. Brilliant job.
    Thanks a million..

  2. I have a question…Your Formula works fine for converting a 7-digit Julian date to a calendar date. My question is how you modify to use a 4 digit one? 1st digit is the number of the year, and the next 3 digits are the day of the year – meaning that “3177” would be June 26th, 2023, and “5005” would be January 5th, 2025.
    Where I work, we use 16-digit transaction codes and the digits 5-8 represent the Julian date. Extracting the Julian from the transaction number in excel is easy, I just need a formula to convert those 4 digits to a calendar date please!

    • Dear PHILIP SMITH,
      Thanks for reaching us. I understand that you want to convert a 4-digit Julian date to a Calendar date. In your specified format, the 1st digit is the number of the year, and the next 3 digits are the day of the year.
      To demonstrate this problem, I have taken a dataset that contains 4-digit Julian Dates in the range C5:C10. To convert these Julian dates into Calendar dates, I applied the following formula:

      =DATE(INT(YEAR(TODAY())/10)*10+VALUE(LEFT(C5,1)), 1, MOD(C5, 1000))

      Converting 4 Digit Julian Date to Calendar Date

      Now, you can extract the Julian date from the transaction number and apply the formula above to convert the Julian date to the calendar date.

      Hopefully, I was able to resolve your problem. Let us know your feedback.

      Regards,
      Seemanto Saha
      ExcelDemy

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo