date()

Return the date and time as a 24-character string.

Syntax

date()

Parameters

This function has no parameters.

Description

The date() function returns the current date and time as a 24-character string in the format:

 Sun Sep 16 01:03:52 1973



The date() function is equivalent to the C library ctime(3) function. The date() function is also equivalent to the PSL statement:

asctime(time());

Example

The following example prints the current date and time to the PATROL Console:

today = date();
print("The date is ",today);
Was this page helpful? Yes No Submitting... Thank you

Comments