The MilliSecondOfTheHour function returns the number of milliseconds between the specified TDateTime value AValue, and the beginning of the same hour.
Declaration: Function MilliSecondOfTheHour( const AValue : TDateTime) : Cardinal;
A simple example of its use.