Year 2000.... 
Author Message
 Year 2000....

Can anyone explain to me why this occurs? I have a database app, which is
written in clipper 5.2e. I have the following lines of code in the beginning
of the program;

SET EPOCH TO 1985
SET DATE FORMAT TO "mm/dd/yyyy"

When a user inputs information into a date field in the App, it is reported
just fine...( example, user enters 01/01/2001) ...on all my reports, the
date is correct....

HOWEVER, if I go into DBU and modify one of the same date fields used by
this App(for example I change 01/01/01 to 01/01/02, when I go back into the
App, it reports as 1902!

Is DBU screwed up or am I???

Thanks for any help,

Steve Vosel
PcWhip, Inc.



Mon, 19 Feb 2001 03:00:00 GMT  
 Year 2000....
Have a look at the code for DBU - I guess it does not have the same SET
EPOCH TO  as you are using - why don't you add it - I use the following in
all my code unless there is good reason not too..
 set epoch to (year(date()) - 50) (thanks to Mike Draper)
this works well...

Quote:

>Can anyone explain to me why this occurs? I have a database app, which is
>written in clipper 5.2e. I have the following lines of code in the
beginning
>of the program;

>SET EPOCH TO 1985
>SET DATE FORMAT TO "mm/dd/yyyy"

>When a user inputs information into a date field in the App, it is reported
>just fine...( example, user enters 01/01/2001) ...on all my reports, the
>date is correct....

>HOWEVER, if I go into DBU and modify one of the same date fields used by
>this App(for example I change 01/01/01 to 01/01/02, when I go back into the
>App, it reports as 1902!

>Is DBU screwed up or am I???

>Thanks for any help,

>Steve Vosel
>PcWhip, Inc.




Mon, 19 Feb 2001 03:00:00 GMT  
 Year 2000....
Steve,

DBU is NOT Y2K compliant as it comes. Go to \clipper\source\dbu and add the
SET EPOCH TO 1985 line, recompile. Be sure to remove any other versions from
your path.

Shalom



Tue, 20 Feb 2001 03:00:00 GMT  
 Year 2000....


Quote:
>Can anyone explain to me why this occurs? I have a database app, which is
>written in clipper 5.2e. I have the following lines of code in the beginning
>of the program;

>SET EPOCH TO 1985
>SET DATE FORMAT TO "mm/dd/yyyy"

>When a user inputs information into a date field in the App, it is reported
>just fine...( example, user enters 01/01/2001) ...on all my reports, the
>date is correct....

>HOWEVER, if I go into DBU and modify one of the same date fields used by
>this App(for example I change 01/01/01 to 01/01/02, when I go back into the
>App, it reports as 1902!

>Is DBU screwed up or am I???

DBU defaults to

SET EPOCH TO 1900

You will have to go to the DBU source code, insert the two lines you
quoted above, and compile/link it. Then use that one instead of the
original.

--

        Oasis WWW  http://www.iag.net/~philb/
 Oasis WWW Mirror  http://www.enterconnex.com/oasis/
         FTP Site  ftp://ftp.iag.net/pub/clipper

             Always remember you are unique...
               Just like everyone else!



Tue, 20 Feb 2001 03:00:00 GMT  
 Year 2000....
I understand that DBU may not have the same 'EPOCH' code.....however, when I
use my application to display the dates that were entered using DBU, MY
APPLICATION shows them as 1900, 1901, etc...even though my App has the EPOCH
set to 1985....

It seems like Clipper somehow knows from which program the dates were
entered....hope this is understandable....it is confusing to me...

Thanks Again,

Steve Vosel



Tue, 20 Feb 2001 03:00:00 GMT  
 Year 2000....
Steve

Your confusing reading with writing.

When you enter dates (eg 01/01/01) in your app they are written with as
'20010101'
in DBU they are written as '19010101' because of the different EPOCH
settings.

When you read them from with app you'll see '01/01/2001' and '01/01/1901'

The writing to the file is where the EPOCH inference is done not the
reading.

HTH
--
Steve Quinn
BRUTE Computer Services - Australia

http://www.brutecom.com.au

Quote:

>I understand that DBU may not have the same 'EPOCH' code.....however, when
I
>use my application to display the dates that were entered using DBU, MY
>APPLICATION shows them as 1900, 1901, etc...even though my App has the
EPOCH
>set to 1985....

>It seems like Clipper somehow knows from which program the dates were
>entered....hope this is understandable....it is confusing to me...

>Thanks Again,

>Steve Vosel




Wed, 21 Feb 2001 03:00:00 GMT  
 Year 2000....


Quote:
>I understand that DBU may not have the same 'EPOCH' code.....however, when I
>use my application to display the dates that were entered using DBU, MY
>APPLICATION shows them as 1900, 1901, etc...even though my App has the EPOCH
>set to 1985....

>It seems like Clipper somehow knows from which program the dates were
>entered....hope this is understandable....it is confusing to me...

When dates are stored, they are stored YYYYMMDD, so of course, that
carries the proper date into storage.

The problem comes when a YYMMDD date is entered and interpreted wrong.

--

        Oasis WWW  http://www.iag.net/~philb/
 Oasis WWW Mirror  http://www.enterconnex.com/oasis/
         FTP Site  ftp://ftp.iag.net/pub/clipper

             Always remember you are unique...
               Just like everyone else!



Wed, 21 Feb 2001 03:00:00 GMT  
 Year 2000....

Quote:

>I understand that DBU may not have the same 'EPOCH' code.....however, when
I
>use my application to display the dates that were entered using DBU, MY
>APPLICATION shows them as 1900, 1901, etc...even though my App has the
EPOCH
>set to 1985....

>It seems like Clipper somehow knows from which program the dates were
>entered....hope this is understandable....it is confusing to me...

>Thanks Again,

>Steve Vosel

>Now, now, If your program instructs dates with two digit year data entry to

switch to 2000 as required that does not mean that someone else's program
will automatically be changed. The change is not inside the DBF file, the
DBF will take what it is given. Why would you even think that DBU would all
of a sudden implement a special date entry handler after you have changed a
completely disconnected, unattached exe file. DBU does not even know that
your program exists!

To be exceedingly  polite, I am a wee bit surprised  at your confusion.
'Clipper' is a toolbox from which you grab a few hammers and screwdrivers
and put them in with your programs. And if DBU wants the appropriate tools
it can take them also. But you have to do that by compiling and linking DBU
after telling it that you want this year 2000 thing.

Jacob



Fri, 23 Feb 2001 03:00:00 GMT  
 Year 2000....
To Steve Quinn & Phil Barnett, I'd like to thank you for your input &
explanation regarding my date questions. I had no idea that clipper stored
an extra two digits in its date fields. Again, thank you.

To Jacob Abas, I must assume that you are one of the lucky few who never
have had to ask a question & who always understands things the first time it
is presented to him/her. Oh, if I could only be like you....then I could
pompously respond to all the idiots like me with MY glorious insight.

To be exceedingly  polite, you know where you can put your screwdrivers &
hammers.



Sat, 24 Feb 2001 03:00:00 GMT  
 Year 2000....

wrote (possibly edited):

Quote:
>To be exceedingly  polite, you know where you can put your screwdrivers &
>hammers.

Careful!!  People will start to think you're from Australia.

Don

"Politicians are like babies:  They need to be changed regularly
and for the same reason."



Sun, 25 Feb 2001 03:00:00 GMT  
 Year 2000....
And the problem with Australians is ..... (other than I live in a Canadian
Winter Waste Land)
Quote:


>wrote (possibly edited):

>>To be exceedingly  polite, you know where you can put your screwdrivers &
>>hammers.

>Careful!!  People will start to think you're from Australia.

>Don

>"Politicians are like babies:  They need to be changed regularly
>and for the same reason."



Sun, 25 Feb 2001 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. Is year 2000 a leap year??

2. Extensive cobol year 2000 methodology by TOPIC-2000

3. Cobol year 2000 solutions by TOPIC 2000

4. Year 2000 Newsgroup

5. OS/390 Release 2 Year 2000 discussion

6. Year 2000 IBM Asm370 Booming Job Market

7. Sr. Programmer/Analysts for Year 2000 project

8. Sr. Programmer/Analysts for Year 2000 project

9. Year 2000 course available

10. Year 2000 issues panel at TOT Conference

11. The Year 2000 and Commercial APL

 

 
Powered by phpBB® Forum Software