Get current Platform time (Now() function)

The Now() function retrieves the current Platform time in seconds since January 1, 1970 (Unix Epoch time). Use this function when comparing the current Platform time with another time (using the Date() function), or when creating an audit log entry that identifies the current system time in a message (using the FormatDate() function to convert the date/time to a string).

Format:

Long Now()

Example:

The following example determines if the current Platform time is later than 05/12/2010.

If: Now() > Date("05/12/2010")

The following example prints the current date and time (using the default format) in an Audit message:

Then: Audit("data-management", "Alarm generated at " + FormatDate(Now(), "yyyy/MM/dd hh:mm:ss"))

 

See Also