> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Carl Reynolds
> Sent: Friday, 17 December 1999 11:26
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Date/Time calculations
>
>
> The problem is not with the VCL at all. The following code:
>
> var CDate: TDateTime;
>
> CDate := Date - DOB;
>
> is incorrect. Subtracting one date from another does not yield a
> date, but
> rather an interval - a period of time, best expressed as a number.
The point you're missing is that the number is supposed to be convertible
into a number of years, months and days, but the standard routine Delphi
provides for doing this adds an offset of 30/12/1899 to it. Delphi does not
provide any other routine for so doing.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz