From Clomosy Docs
No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (4 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 Now():TclDateTime; | |||
</div> | |||
The Now function returns the current date and time in the local time zone.<br> | |||
''' | <b>Example</b><br> | ||
<pre> | |||
var | |||
today : TclDateTime; | |||
{ | |||
today = Now(); // or Now | |||
ShowMessage('Today has date = '+DateToStr(today)); | |||
ShowMessage('Today has time = '+TimeToStr(today)); | |||
} | |||
</pre> | |||
<b>Output:</b><br> | |||
<div class="alert alert-success" role="alert" data-bs-theme="light"> | |||
Today has date = 28.02.2023 | |||
Today has time = 13:08:53 | |||
</div> | |||
<h2> See Also </h2> | |||
* [[System_Library#Date_and_Time_Functions | Date and Time Functions]] | |||
{{#seo:|title=Now Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Now returns the current date and time in the local time zone, providing an easy way to get the current timestamp for your application.}} | |||
Latest revision as of 14:00, 24 December 2024
function Now():TclDateTime;
The Now function returns the current date and time in the local time zone.
Example
var
today : TclDateTime;
{
today = Now(); // or Now
ShowMessage('Today has date = '+DateToStr(today));
ShowMessage('Today has time = '+TimeToStr(today));
}
Output:
Today has date = 28.02.2023 Today has time = 13:08:53