# Formatting Dates

For dates, there is the _Date_ format.

To apply the date format to a cell value:

1\) Select a cell or a range of cells to format.\
&#x20;2\) Click the **Date format** button in the Number section to open a drop-down list with number formats.\
&#x20;3\) Choose the necessary format that will be applied to the selected cells.\


## Customizing the Default Date Format

You can choose one of the predefined date and time formats:

1\) Select a cell or a range of cells to format.\
&#x20;2\) Click the **Date format** button in the Number section to open a drop-down list with number formats and select the **Date** option.\
&#x20;3\) Select **Date**.\
&#x20;4\) Select the format:

![Date Format Settings](https://3310388157-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LEEOWDArdNNgipO8mVJ%2F-M1QTytWZW7Z_ODoZKxZ%2F-M1QTzWGnNb2MQHZ1SSU%2Fdefault_date_formats.png?generation=1583156559109021\&alt=media)

## Custom Date Format

You can customize the predefined Date formats.

To customize a predefined date format:

1\) Select a cell or a range of cells to apply custom format to.\
&#x20;2\) Click the format button in the **Number** section and select the **Custom** option.\
&#x20;3\) Select **Custom**.\
&#x20;4\) Edit the date format line:

![Custom Date Format](https://3310388157-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LEEOWDArdNNgipO8mVJ%2F-M1QTytWZW7Z_ODoZKxZ%2F-M1QTzWI8UTSQi3zMs7M%2Fcustom_date_format.png?generation=1583156559284524\&alt=media)

An example of a format line:

```
mm/dd/yyyy hh:mm
```

These are the allowed characters for a date format string:

* the date part:
  * "yy" - the year as a two-digit number (00 to 99);
  * "yyyy" - the year as a four-digit number (1900–9999);
  * "m" - the month as a number without a leading zero (1 to 12);
  * "mm" - the month as a number with a leading zero (01 to 12);
  * "mmm" - the month as an abbreviation (Jan to Dec);
  * "mmmm" - the month as a full name (January to December);
  * "mmmmm" - not supported by Webix, but interpreted as "mmmm"
  * "d" - the day as a number without a leading zero (1 to 31);
  * "dd" - the day as a number with a leading zero (01 to 31);
  * "ddd" - the day as an abbreviation (Sun to Sat);
  * "dddd" - the day as a full name (Sunday to Saturday);
* the time part:
  * "h" - the hour based on the 24-hour clock (0 to 23);
  * "hh" - the hour based on the 24-hour clock with a leading zero (00 to 23);
  * "m"- not supported by Webix, but interpreted as "mm"
  * "mm" - the minute as a number with a leading zero (00 to 59);
  * "s" - not supported by Webix, but interpreted as "ss"
  * "ss" - the second as a number with a leading zero (00 to 59);
  * "AM/PM" - displays AM (for times from midnight until noon) and PM (for times from noon until midnight).

5\) To apply the new format, click **Save**.
