NexJ Logo

Date()

Creates a date using the specified day, month, year, and time zone. This function takes three integer values and a string value as arguments and returns a date value.

Syntax

Date(<day>, <month>, <year>, <time_zone>)

Input

day

integer

The day of the month.

month

integer

The month of the year.

year

integer

The year.

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

  • The expression Date(31, 1, 2000) returns a date value that represents January 31, 2000.
  • The expression Date(31, 1, 2000, "UTC") returns a date value that represents January 31, 2000 UTC.

Time zones