Enter a date
If a cell is configured to validate the specified date, in such a cell, you can enter:
- Number. The application will automatically convert it to the appropriate date. For example, the number 1 will be converted to the date 12/31/1899.
- The date in any supported data display format, including time indication. For example, 07/12/2023 10:30 AM.
- Cell reference (for example, =B1). The date in a cell can be specified directly, using a function or a reference to another cell.
- Function (for example, =TODAY()+6). The function can be of any kind.
An error message is displayed if:
- You enter a date, a cell reference, or a function that does not comply with the validation.
- You enter text into the cell or Text format is selected for the cell.
To enter a date in a cell, follow the steps below:
- Select the cell. A prompt for entering the date will be displayed above the cell, if it was created.
- Enter the date in one of the ways described above.
- Press Enter or click the
button in the Formula bar. If the date is not entered as a reference or function, you can also click any other cell in the sheet or any column/row header.
If the date satisfies the validation conditions, you will quit the cell editing mode. The Date format is applied to a cell if another format was selected for the cell before entering the value (with an exception of the Text format).
If the date does not meet the validation conditions, then:
- The date is highlighted.
- The cell remains in editing mode.
- An error message is displayed.
To close the error message and enter the correct date, do one of the following:
- Start entering the date. The error message will close automatically.
- Close the error message by clicking the
button at the top of the message or by pressing Esc. Enter the date.