From Clomosy Docs
(Created page with " function DateToStr(Date TDateTime):string; The DateToStr function converts a DateTime value to a formatted date string. '''Example:'''<br> begin ShowMessage('myDate = '+'''DateToStr'''(Date)); end; '''Output:'''<br> myDate = 27.02.2023") |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> | |||
function DateToStr(const DateTime: TclDateTime):string; | |||
</div> | |||
Converts a TclDateTime value into a string.<br> | |||
Use DateToStr to obtain a string representation of a date value that can be used for display purposes. | |||
<b>Example</b><br> | |||
'''Output: | <pre> | ||
var | |||
myDate : TclDateTime; | |||
{ | |||
myDate = StrToDate('27.02.2023'); | |||
ShowMessage('myDate = '+DateToStr(myDate)); | |||
} | |||
</pre> | |||
<b>Output:</b><br> | |||
<div class="alert alert-success" role="alert" data-bs-theme="light"> | |||
myDate = 27.02.2023 | |||
</div> | |||
<h2> See Also </h2> | |||
* [[System_Library#Type_Conversion_Functions | Type Conversion Functions]] | |||
{{#seo:|title=DateToStr Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Learn how to use the DateToStr function in Clomosy to convert TclDateTime values into easily readable date strings for display.}} | |||
Latest revision as of 15:05, 24 December 2024
function DateToStr(const DateTime: TclDateTime):string;
Converts a TclDateTime value into a string.
Use DateToStr to obtain a string representation of a date value that can be used for display purposes.
Example
var
myDate : TclDateTime;
{
myDate = StrToDate('27.02.2023');
ShowMessage('myDate = '+DateToStr(myDate));
}
Output:
myDate = 27.02.2023