The MilliSecondOfTheDay function returns the number of milliseconds from the specified TDateTime value AValue, and 12:00 A.M. of the same day.
This could be a very large number.
Declaration: Function MilliSecondOfTheDay( const AValue : TDateTime) : Cardinal;
An example of its use.