From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 27: | Line 27: | ||
end; | end; | ||
</pre> | </pre> | ||
<b>Output:</b><br> | <b>Output:</b><br> | ||
| Line 35: | Line 33: | ||
Today has time = 13:08:53 | Today has time = 13:08:53 | ||
</div> | </div> | ||
<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]] | ||
Revision as of 07:50, 8 October 2024
function Now():TclDateTime;
The Now function returns the current date and time in the local time zone.
Example
TRObject Syntax
var
today : TclDateTime;
{
today = Now(); // or Now
ShowMessage('Today has date = '+DateToStr(today));
ShowMessage('Today has time = '+TimeToStr(today));
}
Base Syntax
var
today : TclDateTime;
begin
today := Now(); // or Now
ShowMessage('Today has date = '+DateToStr(today));
ShowMessage('Today has time = '+TimeToStr(today));
end;
Output:
Today has date = 28.02.2023 Today has time = 13:08:53