Header Ads Widget

Responsive Advertisement
You can change the format of the Google Sheet's date and how it is displayed using the TEXT function.

Google Sheets dates are internal stored in numbers. The number of days since midnight on December 30, 1899 is the value. The fractions are used to store the time values.

Google Sheet stores the cell value in the following example: Jan 1, 1990. The internal date value of a date with a time component will be 2.75.

Google Sheets displays date and time values in the dd/mm/yyyyy format depending on the Spreadsheet locale. However, this format can easily be customized with the built-in text function.

You can display a date such as 15/10/2021 as Oct 15 2021, or as a long format, Friday, October 15 2021, or extract the time component to display it as 03.52 PM.

Google Sheets allows you to convert date formats

Google Sheets' TEXT function allows you to convert date and time values to another format. It requires two parameters:

1. The date/time value to be converted.

2. This is the preferred format for converting date or time values to.

=TEXT(A1, "MMMM d, YYYY")

Repeated pattern in custom date formats

The meaning of the placeholders, such as d, m and y depending on how many pattern letters are used, is different.

If the input date is October 5, then the format code d will display 5 as the day of the month. However, if the format codes is dd, it will display a zero-padded value of 05 as the 05. The format code ddd will display the abbreviated weekday Tue. However, dddd will display the full weekday as Tuesday.

Similar to the month placeholder, mm will show the zero-padded numerical value, but mmm or mmmm will show the abbreviated or full month names.

Date Formats with Array Formulas

You can convert dates from Google Sheets by using an array formula in a column.

If the date column is located in cell A1, the following array formula can be used in the first column of an empty column. It will display the same date/time value, but in a different format.

Post a Comment