---
title: "Correcting date formats in Google Sheets with Apps Script"
author: "Phil Bainbridge"
date: 2024-06-13T14:01:58+00:00
canonical_url: https://pulse.appsscript.info/p/2024/06/correcting-date-formats-in-google-sheets-with-apps-script/
markdown_url: https://pulse.appsscript.info/p/2024/06/correcting-date-formats-in-google-sheets-with-apps-script.md
categories:
  - "Sheets"
  - "Snippet"
tags:
  - "pbainbridge.co.uk"
featured_image: https://pulse.appsscript.info/files/2024/06/CorrectdateformatsinaGoogleSheet.png
description: "Latest little snippet from Phil Bainbridge which shows how you can use Google Apps Script to correct date formats in a Google Sheet. The script loops through all the sheets in the file, finds all the date values, and checks their format. If the format is not the desired one, the script updates it. Click through to read more and watch Phil’s video showing the problem."
---

# Correcting date formats in Google Sheets with Apps Script

![Correcting date formats in Google Sheets with Apps Script](https://pulse.appsscript.info/files/2024/06/CorrectdateformatsinaGoogleSheet.png)

> [https://www.pbainbridge.co.uk/2024/06/correct-date-formats-in-google-sheet.html](https://www.pbainbridge.co.uk/2024/06/correct-date-formats-in-google-sheet.html)
> Search through Google Sheet data and correct the format of any date values to your choosing.

The following Google Apps Script is just one way you could search through data within a Google Sheet, pinpoint all date-values (no matter where they are), check their format (e.g. dd/mm/yyyy) and update it to a format of your choosing if necessary.

This function has been useful when American/British date formats have managed to make their way into a Google Sheet.

Source: *[The Gift of Script: Correct date formats in a Google Sheet*](https://www.pbainbridge.co.uk/2024/06/correct-date-formats-in-google-sheet.html)

---

*Published by [Phil Bainbridge](https://pulse.appsscript.info/p/author/phillipbainbridge/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2024/06/correcting-date-formats-in-google-sheets-with-apps-script/](https://pulse.appsscript.info/p/2024/06/correcting-date-formats-in-google-sheets-with-apps-script/)*
