Now
Returns the current DateTimeObject representing the current zoned instance
Method Signature
Now(timezone=[string])
Arguments
Argument
Type
Required
Description
Default
timezone
string
false
A timezone to use for the DateTime object, defaults to the system default
Examples
Using now() in Script
Let's display the current server datetime using script.
writeOutput( "The current date and time is: " & now() );
Result: The current date and time is: {ts '2014-03-19 15:27:42'}
Using now() in Tagged BL
Let's display the current server datetime using tagged BL.
<p>The current date and time is: <bx:output>#now()#</bx:output></p>
Result: The current date and time is: {ts '2014-03-19 15:27:42'}
Additional Examples
writeOutput( "current Datetime is " & now() );
Related
Last updated
Was this helpful?