Admin posted on October 14, 2009 10:12

Back to the Julian date post

 

I was curious as to how this particular Julian date conversion worked; I hate implementing something without knowing why it worked. Pardon that blog, but offered no service to a reader without including an explanation, so I ask for forgiveness at this time. Normally if you do implement something such as this without full understanding, when it breaks you have a problem.  So here’s the skinny on JD Edwards Julian dates and what they like.

 

JD Edwards looks at the year and century as 3 digits, like so:

 

010 – this is the year 1910

 

079 – this is the year 1979

 

109 – this is the current year of 2009

 

The century is designated by the first digit, and the year by the last two. Note that SQL Server implementations oftentimes cast these to an integer, so that the first digit falls off. The last three digits is simply the day of year. For example:

 

01010 – Julian for the 10th day of the year, which we assume is January 10

 

07950 – Julian for the 59th day of the year, somewhere in February I’m guessing

 

109365 – Julian for 365th day of the year, December 31, 2009

 

 

I’m not sure how many Julian date functions you might get while searching Google! but I’m guessing that it’s somewhere in the neighborhood of 100 billion.  This one covers JDE that I know of, based on my work in two AS/400 implementations within the last year, so give it a try the next time that you need to do some date conversions.

 

Lee

 

 

-----------------


"Whatever" is really the 'most' annoying word in the English language? 

http://planetsmilies.net/machine-smiley-7600.gif


Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading




by Lee Everest, M.S.

Search


Ads

Calendar

«  July 2010  »
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
View posts in large calendar

Tags

Disclaimer
The opinions, code, examples, et.al. expressed herein are my own personal opinions and do not represent my employer's view in any way, shape form, or fashion.  All code for demonstration purposes - no guarantees, either written or implied, are made.

© Copyright 2010 Lee Everest's SQL Server, etc. weblog