× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Booth, 

The problem is that CL doesn't have a date data type, so the "Julian"
date is stored as a regular character/numeric value.

If you take a date, say 01/02/2006 and convert it to Julian, you'd get
2006002.  CL doesn't see this as being any different than the number
2006002.  So if you subtract 3, you'd get 2005999 instead of 2005364.

You would of course get an error if you try to convert 2005999 back to
mm/dd/yyyy.

HTH,

Charles Wilt
--
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
  

> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx 
> [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth Martin
> Sent: Monday, May 01, 2006 11:18 AM
> To: Midrange Systems Technical Discussion
> Subject: Re: Date Conversion
> 
> ?? Doesn't Julian have the formst of YYDDD, so it knows when 
> you cross 
> year boundaries?
> 
> Wilt, Charles wrote:
> > Note that converting to Julian in CL will not help if you 
> expect to be
> > able to cross year boundaries.  You can use Julian, but 
> you'd have to
> > handle the change of year and the fact that the last day of 
> a year could
> > be day 365 or day 366 yourself.
> > 
> > The problem is that CL has no date data type.
> > 
> > The easiest way to do this is to do it in RPG IV instead of CL.
> > 
> > If you absolutely have to use CL.  Then switch to CLLE and see about
> > using the ILE CEE APIs, Convert Date to Lilian Format (CEEDAYS) and
> > Convert Lilian Date to Character Format (CEEDATE).
> > 
> > 
> > HTH,
> > 
> > Charles Wilt
> > --
> > iSeries Systems Administrator / Developer
> > Mitsubishi Electric Automotive America
> > ph: 513-573-4343
> > fax: 513-398-1121
> >   
> > 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.