Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
type TDateTime = type Double;
Represents a date and time value.
A TDateTime value is stored as a Double value variable. The integral part represents a date part, time part is held in fractional part. The date part of the TDateTime variable represents the number of days that have passed since 12/30/1899.
Because TDateTime is actually a double value, we can perform "number" calculations on it. To find the fractional number of days between two dates, simply subtract the two values.
var aDateTime, AnotherDateTime : TDateTime;
aDateTime := Now;
AnotherDateTime := aDateTime + 1;
//one day in the future
|
DateTimeToStr, DateTimeToFileDate,
| Free Delphi code snippet inside every Delphi Newsletter! |
|
|
| Got some code to share? Got a question? Need some help? |
|
|