None of this explains how 12345 converts to 05/01/2001 (example) (or
vice-versa) as blindingly fast as it always has. We all can write all the
formulas that we want. I want to know what the 'Pick' method is. Unless it
truly is a whole lot of adding and dividing. I thought that was clear in my
original request.

Thanks
Mark Johnson
----- Original Message -----
From: "Keith Johnson (DSLWN)" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Sunday, July 15, 2007 6:16 PM
Subject: Re: [U2] [UV] Conversion code for week number


> Wol wrote
>
> >INT (DAY / 365.25)
> >
> >will always give the correct number of years since day 0.
>
> The following shows that is not strictly true because of the centennial
> non-leap year.
>
> Test Program
> 001:      ZZ = 0
> 002:      FOR XX = 1 TO 50000
> 003:         Y1 = 1968 + INT((XX-1)/365.25)
> 004:         Y2 = OCONV(XX,'DY')
> 005:         IF Y1 NE Y2 THEN
> 006:            ZZ += 1
> 007:            CRT ZZ,XX,OCONV(XX,'D')
> 008:         END
> 009:      NEXT XX
>
>
> Results
> 1         48579     01 JAN 2101
> 2         48944     01 JAN 2102
> 3         49309     01 JAN 2103
> 4         49674     01 JAN 2104
>
> I vaguely remember a comment a long time ago (maybe in c.d.p?) that the
> date was chosen _because_ it was a leap year that started on a Sunday
> and that this helped in converting dates from other IBM formats for the
> GIRLS/GIM project.
>
> Regards, Keith
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to