Farsi Components

   Home  |   Products  |   Download  |   Order  |   Support  |   Contact



ShDate Solutions
ShDate Utils
ShDate Fields



Get Firefox!
Products  >  ShDate Solutions

About TDateTime

TDateTime is the data type used in VCL and CLX for representing date and time values. In Delphi, TDateTime is a type that maps to a Double and represents date and time together in a single compact value. Its integral part is used for storing date and its fractional part is used for time.

The Gregorian calendar is used for implementing date-time support in Delphi. Despite TDateTime is independent of calendar type and its calculations. These are encode and decode functions that play the main role. ShDateUtils unit makes it possible to use TDateTime with Hijri Shamsi date by implementing these functions for Jalali (Hijri Shamsi) calendar.

TDateTime type:

  • type TDateTime = type Double;
  •  The integral part of a TDateTime value is the number of days that have passed since 12/30/1899 corresponds to 1278/10/09. The fractional part of a TDateTime value is fraction of a 24-hour day that has elapsed.
  • Some examples of TDateTime values and their corresponding dates and times:
    •  0      12/30/1899 12:00 am   1278/10/09 12:00 am
    •  2.75   01/01/1900 06:00 pm   1278/10/11 06:00 pm
    • -1.25   12/29/1899 06:00 am   1278/10/08 06:00 am
    • 35065   01/01/1996 12:00 am   1374/10/11 12:00 am

To top of page
   © Copyright 2001-2008 Amir Rahimi Farahani. All rights reserved.