Fórum DateTime e Integer #192220
01/11/2003
0
Obrigado!
[b:2dc613fa74]Título editado. Por favor, leia as regras de conduta.[/b:2dc613fa74]
Michaell
Curtir tópico
+ 0Posts
01/11/2003
Lcquinhone
Gostei + 0
01/11/2003
Michaell
Obrigado!
Gostei + 0
02/11/2003
Adilsond
TDateTime type
TDateTime is a used by the date and time routines to hold date and time values.
Unit
System
type TDateTime = type Double;
Description
Most VCL objects represent date and time values using the TDateTime type. [u:ede45a168b]The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is fraction of a 24 hour day that has elapsed[/u:ede45a168b].
Following are some examples of TDateTime values and their corresponding dates and times:
012/30/1899 12:00 am
2.751/1/1900 6:00 pm
-1.2512/29/1899 6:00 am
350651/1/1996 12:00 am
To find the fractional number of days between two dates, simply subtract the two values. Likewise, to increment a date and time value by a certain fractional number of days, simply add the fractional number to the date and time value.
Note:Delphi 1.0 calculated the date from year 1 instead of from 1899. To convert a Delphi 1.0 date to a Delphi 2.0 date, subtract 693594.0 from the Delphi 1.0 date. The date format changed to be more compatible with OLE 2.0 Automation.
Ou seja:
CampoData := CampoData + CampoInteiro;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)