How to convert a conventional date to julian date

Maria Garcia

Member
I have to import data to JD Edwards (from text files) and I need to convert a conventional date to JD Edwards Julian date and I don´t have any idea to do that.

Somebody could help me please??

Thanks a lot...

Maria Garcia
Project Leader
 
I THINK the date server is X0028.

Find a pgm where a user inputs a date,
and look in the RPG for where the date gets "scrubbed".
That will give you the (correct) server and parms.

Gene
 
There are a few threads on this topic in JDEList already. Try searching
using =93X0028=94 and there are some older threads that were probably under
=93Julian to Gregorian=94 or just plain old =93Date Conversion=94 - listers
CURRYJ and DALE_DRAPER I think supplied a bit of material about 4-5
years ago.



Using X0028 is one way, another possible is using file F00365 with
Gregorian and retrieve Julian (JDE style).
 
Appendix B: VBA Function to Convert Julian Date



How to use function





Function jdate(sdate As Date) As String

Dim MyDate, MyDate2, MyDate3, Myear, Myear2, m As Variant

jdate =3D ""

If IsDate(sdate) =3D True Then

MyDate =3D Format(sdate, "mm/dd/yy")

MyYear =3D Format(MyDate, "yy")

MyDate3 =3D Format(sdate, "mm/dd/yyyy")

Myear2 =3D Format(MyDate, "yyyy")

MyDate2 =3D DateValue("1/1/" & MyYear)

m =3D DateDiff("d", MyDate2, MyDate) + 1

jdate =3D Trim(Format(MyYear, "00")) & Trim(Format(m, "000"))

If Myear2 >=3D 2000 Then

jdate =3D "1" & jdate

End If

End If

End Function





Keith Figgins, CPIM
303-810-2344 Cell
719-213-2103 FAX

_____

From: [email protected] [mailto:[email protected]] On
Behalf Of Maria Garcia
Sent: Tuesday, September 26, 2006 3:02 PM
To: [email protected]
Subject: How to convert a conventional date to julian date




I have to import data to JD Edwards (from text files) and I need to convert
a conventional date to JD Edwards Julian date and I don=B4t have any idea to
do that.

Somebody could help me please??

Thanks a lot...

Maria Garcia
Project Leader

_____


The entire <http://www.jdelist.com/ubb/showflat.php?Cat=3D&Board=3D> JDELIST
thread is available for viewing.


Looking for a job? Check out the Job
Opportunites
forum


This is the JDELIST World Mailing List.
The instructions on how to unsubscribe from any JDELIST mailing list are
available here <http://www.jdelist.com/unsubscr.shtml> .
JDELIST is not affiliated with JDEdwards=AE.

.

To unsubscribe from this list via email, Click
<mailto: [email protected]?Subject=3DUnsubscribe&Body=3DSirs,

P
lease remove this address from the JDELIST World Maili ng%
 
If you want to do the conversion in Excel you don't need VBA. Simply
use the following calculation (assuming the Gregorian date is in cell
B5).

=(YEAR(B5)-1900)*1000+B5-DATE(YEAR(B5),1,1)+1

To convert the other way, assuming the Julian date is in cell B2 use:

= DATE(FLOOR(B2/1000+1899,1), 12, 31) + MOD(B2, 1000)
 
Hi,

Try this:
Formule=3DDATE(1900+ENT(Cellule Date_Julien/1000);1;MOD(Cellule Date_Julien;1000))
Tape in A1 as 106251 (Julian date) and paste formule in B1, replace "Cellule Date_Julien" by "A1"

J=E9r=F4me
 
DATE(digits(DECIMAL(jdedate+1900000,7,0)))



use the above ina an sql statement
 
Back
Top