From Clomosy Docs
(Created page with " function TimeToStr(Time TclDateTime):string; The TimeToStr function converts a TclDateTime value Time into a formatted time string. The time is formatted using the LongTimeFormat value, which in turn uses the TimeSeparator value.<br> '''Example:'''<br> '''var''' myTime : TclDateTime;<br> '''begin'''<br> myTime := StrToTime('15:22:35'); ShowMessage('myTime = '+TimeToStr(myTime));<br> '''end;''' '''Output:'''<br> myTime = 15:22:35") |
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 TimeToStr(const S:TclDateTime):string; | |||
</div> | |||
The TimeToStr function converts a TclDateTime value | The TimeToStr function converts a TclDateTime value S into a formatted time string. The time is formatted using the LongTimeFormat value, which in turn uses the TimeSeparator value.<br> | ||
<b>Example</b><br> | |||
<pre> | |||
myTime : TclDateTime; | var | ||
myTime : TclDateTime; | |||
myTime | |||
ShowMessage('myTime = '+TimeToStr(myTime));< | { | ||
myTime = StrToTime('15:22:35'); | |||
ShowMessage('myTime = '+TimeToStr(myTime)); | |||
} | |||
</pre> | |||
<b>Output:</b><br> | |||
<div class="alert alert-success" role="alert" data-bs-theme="light"> | |||
myTime = 15:22:35 | |||
</div> | |||
<h2> See Also </h2> | |||
* [[System_Library#Type_Conversion_Functions | Type Conversion Functions]] | |||
{{#seo:|title=TimeToStr Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Convert TclDateTime values into formatted time strings with TimeToStr. Learn how to use this function with examples for efficient time handling!}} | |||
Latest revision as of 14:06, 24 December 2024
function TimeToStr(const S:TclDateTime):string;
The TimeToStr function converts a TclDateTime value S into a formatted time string. The time is formatted using the LongTimeFormat value, which in turn uses the TimeSeparator value.
Example
var
myTime : TclDateTime;
{
myTime = StrToTime('15:22:35');
ShowMessage('myTime = '+TimeToStr(myTime));
}
Output:
myTime = 15:22:35