Reference > Functions reference > Date functions > Date
 

Date

Returns the calendar date for a month, day, and year.

Format 

Date(month;day;year)

Parameters 

month - the month of the year (a one-digit or two-digit number; see note).

day - the day of the month (a one-digit or two-digit number; see note).

year - the year (four digits between 0001 and 4000—for example, 2019 but not 19).

Important  The order of the parameters in the Date function is always month, day, year, no matter what operating system or FileMaker Pro Advanced date formats you are using.

Data type returned 

date

Originated in 

FileMaker Pro 6.0 or earlier

Description 

The format of the result depends on the date format that was in use when the database file was created. In the United States, dates are generally in the format MM/DD/YYYY. You can change the date format in your operating system.

You can change how the date is displayed by assigning a different date format to the field in Layout mode. Changing the formatting in this way only affects the way the data is displayed, not how it is stored.

Notes 

If you type a month greater than 12 or a day greater than the number of days in a month, FileMaker Pro Advanced adds the extra days or months to the result. The date function also allows zero and negative numbers as parameters. Decimal numbers are truncated to integers.

Example 1 

Date ( 10 ; 10 ; 2019 ) returns 10/10/2019.

Date ( 13 ; 1 ; 2019 ) returns 1/1/2020 (one month after December 1, 2019).

Date ( 6 ; 0 ; 2019 ) returns 5/31/2019 (one day before June 1, 2019).

Date ( 6 ; -2 ; 2019 ) returns 5/29/2019 (three days before June 1, 2019).

Date ( 7 ; 12 ; 2019 ) - Date ( 7 ; 2 ; 2019 ) returns 10.

Example 2 

"Bill Due by: " & Date ( Month ( DateSold ) + 1 ; Day ( DateSold ) ; Year ( DateSold ) ) returns Bill Due by: followed by a value that is one month later than DateSold.

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas