Here’s an Excel function that takes a military style julian date YYDDD (where the DDD is a three digit day from 0 to 365) and converts it to an excel date:

 

Function JDateToDate(JDate As String) As Long

Dim TheYear As Integer

Dim TheDay As Integer

Dim TheDate As Long
TheYear = CInt(Left(JDate, 2))

If TheYear < 30 Then

TheYear = TheYear + 2000

Else

TheYear = TheYear + 1900

End If
TheDay = CInt(Right(JDate, 3))

TheDate = DateSerial(TheYear, 1, TheDay)

JDateToDate = TheDate

End Function

 

Leave a Reply

Your email address will not be published. Required fields are marked *