Wiki Diff updating oE now, revision #1 to tip


@[:datetime:now|]
==== now
<eucode>
include std/datetime.e -- (default namespace is datetime)
include datetime.e
namespace datetime
public function now()
</eucode>

creates a new datetime value initialized with the current date and time.

===== Returns:
A **sequence**, more precisely a **datetime** corresponding to the current
moment in time.

===== Example 1:
<eucode>
include std/datetime.e

datetime dt = now() -- dt is the current date and time
? dt -- display it
dt = now()
-- dt is the current date and time
</eucode>

===== Result:

{2019,9,7,17,20,2}

===== See Also:
[[:from_date]], [[:from_unix]], [[:new]], [[:new_time]], [[:now_gmt]]

Search



Quick Links

User menu

Not signed in.

Misc Menu