Here are some old posts I saved that may be of assistance.
The first was from Nigel [
[email protected]], the second from Hal_McGee
[
[email protected]]
****************************************************************************
****************
The following VB code will give you a function that you can use the same as
the one's already built into Excel. Open the VB Editor with Alt+F11 and add
a new module (on the Insert menu). Paste in the code, and then close the
editor. To use it, if you have a Julian date in cell A1 then in any other
cell enter the formula "=ConvertJulian(A1)" without the quotes. This will
give you an Excel date serial number. Simply format the cell to whatever
date format you wish. Also note that you will find the new function in the
Function Wizard list under Custom or possibly Date.
Copy & Paste this:-
Option Explicit
Function ConvertJulian(JulianDate)
'convert JDE style Julian dates to Excel date serial number.
'Format the cell as date.
Dim YearNo As Integer, DaysNo As Integer, DaysInYear As Integer
YearNo = Left(JulianDate, Len(JulianDate) - 3) + 1900
DaysNo = Right(JulianDate, 3)
If YearNo Mod 4 = 0 Then
DaysInYear = 366
Else
DaysInYear = 365
End If
If DaysNo <= DaysInYear And DaysNo >= 1 Then
ConvertJulian = DateSerial(YearNo, 1, 1) + DaysNo - 1
Else: ConvertJulian = "Invalid Julian Date"
End If
End Function
World A7.3 cum 6
--------------------------
Visit the forum to view this thread at:
http://www.jdelist.com/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=W&Number=27
154
+ - - - - - - - - - - - - - - - - - - - - - - - -+
This is the JDEList World(tm) mailing list / forum.
Archives and information on how to SUBSCRIBE, and
UNSUBSCRIBE can be found on the JDEList Forum at
http://www.JDEList.com
JDEList is not affiliated with JDEdwards®
+ - - - - - - - - - - - - - - - - - - - - - - - -+
****************************************************************************
**************
Kenny,
I use this formula in MS Access to convert the JDE Julian to a date value
where IREFFF is the field in JDE that has the JDE Julian, (in this instance
this is the Effective From date in the F3003 file.)
DateValue("12/31/" & (Int([IrEFFF]/1000))+1899)+([irefff]-Int
([irefff]/1000)*1000)
Here's how it would look in MS Excel
=DATEVALUE("12/31/" & (INT(B1/1000))+1899)+(B1-INT(B1/1000)*1000)
where cell B1 has the JDE Jullian Date.
Good Luck!
Hal McGee
--------------------------
To view this thread, visit the JDEList forum at:
http://www.jdelist.com/cgi-bin/wwwthreads/showflat.pl?Cat=0&Board=W&Number=2
7137
+ - - - - - - - - - - - - - - - - - - - - - - - -+
This is the JDEList World(tm) mailing list / forum.
Archives and information on how to SUBSCRIBE, and
UNSUBSCRIBE can be found on the JDEList Forum at
http://www.JDEList.com
JDEList is not affiliated with JDEdwards®
+ - - - - - - - - - - - - - - - - - - - - - - - -+
****************************************************************************
*************