From Clomosy Docs
No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 11: | Line 11: | ||
<b>Example</b><br> | <b>Example</b><br> | ||
<pre> | <pre> | ||
var | var | ||
| Line 21: | Line 21: | ||
ShowMessage('Date set to '+DateToStr(myDate)); | ShowMessage('Date set to '+DateToStr(myDate)); | ||
} | } | ||
</pre> | </pre> | ||
| Line 41: | Line 30: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Date_and_Time_Functions | Date and Time Functions]] | * [[System_Library#Date_and_Time_Functions | Date and Time Functions]] | ||
{{#seo:|description=Learn how the EncodeDate function in Clomosy converts Year, Month, and Day values into a TclDateTime format for easy date handling.}} | |||
Latest revision as of 07:44, 24 December 2024
function EncodeDate(Year, Month, Day: Word):TclDateTime;
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
var
myDate : TclDateTime;
{
// Set my date variable using the EncodeDate function
myDate = EncodeDate(2023, 02, 27);
ShowMessage('Date set to '+DateToStr(myDate));
}
Output:
Date set to 27.02.2023