Hi Edwin

By the way, I have been bitten in the ass before...

On each date field you can set the Rollover Date Year, ie the 2 digit number that you wish to use as the cusp for entry of 2 digit dates to be interpreted as a 1900 date or a 2000 date. As issue can come in when you change that rollover, as existing data remains as is, (as you would hope) and only new dates are affected... I got bitten in the ass when I was making a change to a panel with a 2 digit year date, and I exported out with Shift-F7, Built in Short Reports, and imported back with CTRL-F5... The problem is that the export in the Built In Short report, maintains the display format rather than the underlying data, so when it is imported it is interpreted by the setting of the RollOver Date...

It actually could be considered the remnants on a unfixed Y2K bug, as it would be much nicer for the Built In Short Report to resolve back to a 4 digit year, and the CTRL-F5 to accept 4 digit years into 2 digit fields preserving the underlying data

Using the Date[day;month;year] function, and then displaying as G99999 is a handy way to see the underlying data.

By the way, Date, Time and Number fields all consume 10 bytes each, depending on what you want, being speed or disk space, it might be easier to store the data as the 999999999 - the Ralph Aly "Moment" , as the real field, and then use Calculated fields to resolve back to Date and Time if they have to be displayed. This will save you 20 bytes per record. Plus you do not have to worry about the problem that bit me.

Regards
Brian



----- Original Message ----- From: "Brian Hancock" <[EMAIL PROTECTED]>
To: "DataPerfect Users Discussion Group" <[email protected]>
Sent: Wednesday, August 02, 2006 11:22 AM
Subject: Re: [Dataperf] Using date to Reverse Index.


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


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

Reply via email to