From Clomosy Docs

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

The EncodeDate function produces a TclDateTime return value from the passed Year, Month, and Day values.

The allowed parameter values ​​are:
Year = 2000..9999
Month = 1..12
Day = 1..31 (depending on month/year)

Example
TRObject Syntax

 var
   myDate : TclDateTime;
 
 {
   // Set my date variable using the EncodeDate function
   myDate = EncodeDate(2023, 02, 27);
   ShowMessage('Date set to '+DateToStr(myDate));
 }

Base Syntax

 var
   myDate : TclDateTime;
 
 begin
   // Set my date variable using the EncodeDate function
   myDate := EncodeDate(2023, 02, 27);
   ShowMessage('Date set to '+DateToStr(myDate));
 end;

Output:

See Also