Hi Edwin,
You should avoid 2 digit year fields, they can bite you in the ass...
You will find that the date in DMDY for 08/02/1906 is the value 2345,
whereas the value for 08/01/2006 is 38869...
You have been bitten in the ass by Y2K...
Regards
Brian
----- Original Message -----
From: "Ralph Alvy" <[EMAIL PROTECTED]>
To: "DataPerfect Users Discussion Group" <[email protected]>
Sent: Wednesday, August 02, 2006 10:44 AM
Subject: Re: [Dataperf] Using date to Reverse Index.
On Tue, 01 Aug 2006 17:04:41 -0700, E. Marfil, MAST UNITED
<[EMAIL PROTECTED]> wrote:
Hello Ralph.
The incremental jump in values are weird but I'm not sure hot it
calculates.
I have to look at it more closely. In any case, it seems to be working.
Thanks for your help and Brian's and Don's too.
The value stored by a DP Date field is the number of days since March 1,
1900.
The value stored by a DP Time field is the number of seconds since
midnight.
This way Date and Time fields can be subtracted from one another. For
instance, 7/31/2006 minus 7/28/2006 equals 3, and 10:32:21 minus 10:31:5
equals 76.
86400 is the number of seconds in a day.
So (P1F1*86400 + P1F2) is the number seconds since March 1, 1900, as of
P1F1 P1F2, where P1F1 is the Date and P1F2 is the Time. A 10-digit
numerical field will handle all possible values for this figure.
Read up on what I call the Moment function in my book.
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf