From Clomosy Docs

Revision as of 08:20, 8 October 2024 by ClomosyManager (talk | contribs)

The EncodeTime function generates a TclDateTime return value from the passed Hour, Min, Sec and MSec (millisecond) values.
The permitted parameter values are :
Hour = 0..23
Min = 0..59
Sec = 0..59
MSec = 0..999

Example
TRObject Syntax

 var
   myDate : TclDateTime;
 
 {
   // Set my date variable using the EncodeTime function
   myDate = EncodeTime(12, 50, 40, 231);
   ShowMessage('Date set to '+TimeToStr(myDate));
 }

Base Syntax

 var
   myDate : TclDateTime;
 
 begin
   // Set my date variable using the EncodeTime function
   myDate := EncodeTime(12, 50, 40, 231);
   ShowMessage('Date set to '+TimeToStr(myDate));
 end;

Output:

See Also