NexJ Logo

Today()

Extracts the month of the year from the specified date. This function takes a date and string value as arguments and returns an integer value. The month of the year is given as a value between 1 and 12.

Syntax

Today(<time_zone>)

Input

time_zone

string

(Optional) The time zone code. This argument specifies the time zone of the date. For example, if you want the date to be in Eastern Standard Time (EST), enter the time zone argument "EST". If you do not specify a time zone, the local time zone of the user who is completing the form is used.

Output

date

Examples


Assume that the current date is January 31, 2000 4:00 AM and the user's local time zone is EST, and that you have a form in which there is a date question that you want to initialize with the current date. The Today() function has been entered in the question's Initialization tab. When you run the form:


  • The expression Today() returns a date value that represents January 31, 2000 12:00 AM EST.
  • The expression Today("UTC") returns a date value that represents January 30, 2000 12:00 AM UTC, because in this example the time zone argument changes the specified date to Coordinated Universal Time, which is January 30, 2000.

Time zones