Scripting > UNICOM Intelligence Function Library > Date and time functions > Now
 
Now
Returns the current local date and time in a particular time zone.
Syntax
Now([ Val [, IgnoreDaylightSaving]])
Parameters
Val
Type: None
Optional. Long or Text value specifying local time zone to use.
IgnoreDaylightSaving
Type: Boolean
Optional. Whether to ignore adjustments for daylight-saving time. Default is False.
(return)
Type: Date
The current local date and time in the time zone.
Remarks
If Val is a Long value, it is the index value of a time zone defined in the registry on the server, or -1 to specify UTC time.
If Val is a Text value, it is the name of a time zone defined in the registry on the server, or “UTC” to specify UTC time.
If Val is omitted, NULL or empty, the time zone associated with the program in which the function is called is used. By default, the program's time zone is the local time zone of the server, but this can be changed by calling SetTimeZone.
If Val is any other type, an error occurs.
If the time zone specified by Val is not in the registry, an error occurs (thus this function can be used to determine whether a specific value represents a valid time zone).
Example
This example returns the current local date and time for the program's time zone:
Now()
See also
DateAdd
Date and time functions