From Clomosy Docs
No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| Line 34: | Line 34: | ||
<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=DecodeTime extracts hours, minutes, seconds, and milliseconds from a TclDateTime value and stores them in specified variables for easy time manipulation.}} | |||
Revision as of 07:58, 24 December 2024
procedure DecodeTime(const DateTime: TclDateTime; var Hour, Min, Sec, MSec: Word);
The DecodeTime procedure extracts the hours, minutes, seconds, and milliseconds from a given TclDateTime type value.
It stores the values in output variables: Hour, Min, Sec and MSec.
Example
var
myHour, myMin, mySec, myMilli : Word;
{
DecodeTime(Now, myHour, myMin, mySec, myMilli);
ShowMessage('Time now = '+TimeToStr(Now));
ShowMessage('Hour = '+IntToStr(myHour));
ShowMessage('Minute = '+IntToStr(myMin));
ShowMessage('Second = '+IntToStr(mySec));
ShowMessage('MilliSec = '+IntToStr(myMilli));
}
Output:
Time Now = 16:02:07
Hour = 16
Minute = 2
Second = 7
MilliSec = 807