From Clomosy Docs

The DecodeDate procedure extracts year, month and day values from a given DateTime TclDateTime type value. It stores the values in the output variables : Year, Month and Day.

Example

 var
    myDate : TclDateTime;
    myYear, myMonth, myDay : Word;
 
 {
    myDate = StrToDate('01 03 2023');
 
    DecodeDate(myDate, myYear, myMonth, myDay);
    ShowMessage('myDate now = '+DateToStr(myDate));
    ShowMessage('myDay      = '+IntToStr(myDay));
    ShowMessage('myMonth    = '+IntToStr(myMonth));
    ShowMessage('myYear     = '+IntToStr(myYear));
 }

Output:

See Also