Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
169 views
in Technique[技术] by (71.8m points)

jdedwards - What is the precise definition of JDE's Julian Date format?

I am writing code to convert from a Gregorian date to a JDE (J.D.Edwards) Julian date.

Note: a JDE Julian date is different from the normal usage of the term Julian date.

As far as I can work out from Googling, the definition of a JDE Julian date is:

1000*(year-1900) + dayofyear

where year is the 4-digit year (e.g. 2009), and dayofyear is 1 for 1st January, and counts up all year to either 365 or 366 for 31st December (depending whether this is a leap year).

My question is this: are years before 1900 supported? If so, does the above formula still hold, or should it be this:

1000*(year-1900) - dayofyear

(note minus instead of plus.)

or something else?

Does anyone have a link to the official documentation for this date format?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The JDE Julian date consists of CYYDDD which is Century, Year, Day of year.

Century is zero for 20th e.g. 19XX and one for 21st e.g. 20XX.

The year is two digits. So 101001 is 1 January 2001

As you can see this will not support dates before 1900.

See this Oracle page for a simple and official explanation: About the Julian Date Format


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...