Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Sheet Resources
Video Transcript
<div>00:00 I think this is going to be a very interesting video because it is something that I ran into myself when I'm creating Google Sheets either to sell or even give away, and we have date formats in them, and we're working with date formats in things like CRMs, with, uh, any time we're doing project management<br>00:19 or task management, we need dates.
Uh, even personal productivity sheets that I make myself, I need dates, and when I give them to someone else, for free, or even if I sell these sheets, uh, these date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab sheets, end up changing, and we have something in file, uh, settings, we have this locale Discover how locale settings impact date formats and other functions in your sheets. Opens in new tab , and<br>00:38 this locale Discover how locale settings impact date formats and other functions in your sheets. Opens in new tab affects the formatting Explore various formatting options to enhance the appearance of your data. Opens in new tab details, such as functions Get familiar with functions that can automate tasks in Google Sheets. Opens in new tab , dates, and currency, but, the thing is, that if I switch Understand how to use the switch function for conditional formatting. Opens in new tab this to, say, a European country right now, or a country that uses a different date, my past cells Learn about cell references and how to manipulate them in your sheets. Opens in new tab , or any information or data Find out how to manage and format data effectively in Google Sheets. Opens in new tab that I have set, will not change, but from the moment <br>00:57 that I set the locale, then every date setting will change for that.
So all this stuff, right? So how do we go back and change any date formats?<br>01:09 but show both date formats whenever someone from that date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab wants to use it? There's two ways we can automate this.<br>01:24 So let's get into it because it is a little bit daunting. know which format Explore various formatting options to enhance the appearance of your data. Opens in new tab to set.<br>01:38 So I'm going to create a new sheet called settings. I'm going to call this date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab in A1. And in A2, I'm going to insert a drop down menu.<br>01:49 And this drop down menu will have the two date formats I want.
So, it could be month, month, slash, day, two days, slash, year, year, year, or the days dd, slash, mm, slash, four years.<br>02:05 And I'm going to hit done. And here, I have have either date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab . Let's make that a little bit bigger so you can see it.<br>02:13 So here we have a drop down menu. We want to set the date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab for all of our data Find out how to manage and format data effectively in Google Sheets. Opens in new tab . So for our test here, I have column A, but you can set this and I'll show you how to set this for range Understand how to define and work with ranges in your spreadsheets. Opens in new tab of data Find out how to manage and format data effectively in Google Sheets. Opens in new tab .<br>02:25 So we're going to go up to extensions, Apps Script Discover how to use Apps Script to automate tasks in Google Sheets. Opens in new tab , and write a little bit of code.
Here we're going to write the function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab updateDateFormat.<br>02:39 We're going to need a function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab . We're going variables, variable ss=" spreadsheetApp Get to know the SpreadsheetApp class for managing your Google Sheets. Opens in new tab .getActiveSpreadsheet". We're going to need where Explore how to use query functions to filter data in your sheets. Opens in new tab we're going to actually change our data Find out how to manage and format data effectively in Google Sheets. Opens in new tab or date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab .<br>02:52 So this is the sheet ss.getSheetByName. That's right. And we're going to use data Find out how to manage and format data effectively in Google Sheets. Opens in new tab . That's the name of the sheet. We need the actual date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab that we're going to change to.<br>03:05 So this will be that settings. So it'll be actually ss.getSheetByName.settings.
getRange Learn how to retrieve specific ranges of cells in Google Sheets. Opens in new tab , a2, getValue Understand how to get values from specific cells in your spreadsheets. Opens in new tab .<br>03:18 So this will just get us whatever is in that a2 cell, that date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab that we're going to have to change to.<br>03:24 Now we're going to need to do a for loop. This for loop is going to need a few items, so we're going to need to know our start row.<br>03:35 So that's going to be two because it's the second row for us if your data Find out how to manage and format data effectively in Google Sheets. Opens in new tab is different, use different things.<br>03:40 Our column is going to be one because it's in the A column.
Again, basically we're based on where Explore how to use query functions to filter data in your sheets. Opens in new tab you have your data Find out how to manage and format data effectively in Google Sheets. Opens in new tab , you're going to change this number Explore number formatting options to display data correctly in your sheets. Opens in new tab .<br>03:48 And we're going to need to know what is the last row we want to change. So our last row is equal to data Find out how to manage and format data effectively in Google Sheets. Opens in new tab . getLastRow Find out how to determine the last row of data in your Google Sheets. Opens in new tab So we don't have to do everything, even setting date formats for blank cells Learn how to handle blank cells when formatting or processing data. Opens in new tab .<br>04:06 That's going to be it. So here, now we're going to write our for loop.
And so our for loop needs three things.<br>04:12 Our for loop needs a, where Explore how to use query functions to filter data in your sheets. Opens in new tab to start, where Explore how to use query functions to filter data in your sheets. Opens in new tab to go until, and then how are we going to iterate it.<br>04:19 So our variable row equals start row, semicolon, row is less than or equal to last row. So we're going to go until this row keeps iterating one up until it's greater than, it's going to still continue as it's less than or equal to the last row.<br>04:43 So how do we iterate it? Row plus plus.
It's just going to add one to the row every single time.<br>04:48 Add a, curly brackets here, and we need to know where Explore how to use query functions to filter data in your sheets. Opens in new tab we're setting, so we need a cell, data Find out how to manage and format data effectively in Google Sheets. Opens in new tab . getRange Learn how to retrieve specific ranges of cells in Google Sheets. Opens in new tab , row, comma, column.<br>05:01 Our row is going to be this. Iterative here, and our column is going to be set right there, one. Well, we need cell equals data Find out how to manage and format data effectively in Google Sheets. Opens in new tab . getRange Learn how to retrieve specific ranges of cells in Google Sheets. Opens in new tab , and now let's set that date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab , cell. getRange Learn how to retrieve specific ranges of cells in Google Sheets. Opens in new tab . setNumberFormat, and use the variable date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab that we're getting from our variable here as the date format.<br>05:31 So we're going to save this all.
Now, if I go back to my settings check, it's day first, then month, then year.<br>05:39 Right now, all of my dates are month, then day, then year. So let's see if this works. Before we create any automations, let's just go in our Apps Script Discover how to use Apps Script to automate tasks in Google Sheets. Opens in new tab and click run for update date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab .<br>05:51 We're going to have to review our permissions, authorize it if need be. This is just the very first time we run it.<br>05:57 And let's see if it works. If we get any errors or anything, they'll come up right away.
And if it works, now our format Explore various formatting options to enhance the appearance of your data. Opens in new tab of date.<br>06:08 Our dates are the day first, then the month, then the year. Great. So how do we automate this? Again, I'm going to show you two ways to automate it.<br>06:16 Go to bettorsheets.co slash snippets. And you can get an unopened menu here. We're going to use this one. This function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab on open up here.<br>06:27 Just copy and paste it from bettorsheets.co slash snippets. And we're going to call this automations. And we just need to put this function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab as the second item here.<br>06:40 And the first item, the name, is update date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab .
We're going to delete the second one, actually. Once it's saved, the one thing we have to do is close Apps Script Discover how to use Apps Script to automate tasks in Google Sheets. Opens in new tab and refresh our sheet or close it.<br>06:56 Close it and open our sheet. Once we do that, I think, next to this Help menu Discover features available in the Help menu to assist with Google Sheets. Opens in new tab , we are going to get, let's see, update date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab .<br>07:09 So, we can, there it is. So, next to the Help menu Discover features available in the Help menu to assist with Google Sheets. Opens in new tab , here is our Automations and Update Date Format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab . So, let's go back to our Settings, A2, change this back to Month, Day, and now click on Automations Update Date Format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab .<br>07:25 I think we have to authorize it and again because we added the UI.
Month, Day, now they are all changed.<br>07:40 Great. So, I'm going to show you another way to automate this that I think is much easier. Much more elegant.<br>07:45 We don't need to add this, we don't need to add this menu, but I think it's a nice thing to add as well.<br>07:52 But let's go back to our Apps Script Discover how to use Apps Script to automate tasks in Google Sheets. Opens in new tab . Now, we need to run this update date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab when we actually change our settings.<br>08:03 So we can use onEdit.
This function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab onEdit is a built-in function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab with an event e that says when this event happens, this e, there's some interesting special things we can know, what row we're on, what sheet we're on, all this stuff.<br>08:16 And we can say, basically, if we're on the right sheet, if we're in the right row, if we're in the right column, run this function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab .<br>08:22 So we can say, variable row equals e. range Understand how to define and work with ranges in your spreadsheets. Opens in new tab .getRow, variable call, for short for column, equals e.getRow. e. range Understand how to define and work with ranges in your spreadsheets. Opens in new tab .getColumn, capital C, and variable sheet equals e.<br>08:48 app.getActiveSheet.getName. There we go.
So now we say if sheet is equal to settings, and we're going to use double ampersand, row equal, is equal to two, and ampersand call is equal to one, two equal signs, basically this is a column, two rows.<br>09:20 I'm going to put a, uh, curly brackets here, and then we're going to run this update, date function Learn about different functions available in Google Sheets for data manipulation. Opens in new tab , need the parentheses.<br>09:29 So basically, only if we're editing that particular cell, on that particular sheet, will we update the date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab . So let's save this all, go back to our page, and see what is it.
It is month, then day, then year, so let's change this to day, month, then year, and go back, and it is now changed.<br>09:56 Without having to go up to automations, without a secondary action, our users can just change this date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab in A2, and it will automatically change the date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab for the entire sheet, or wherever you want your pointing to.<br>10:09 We can add more, uh, basically places to update with just adding more of these variable start rows, these four loops with the particular information we need.<br>10:23 There you go. That's it.
That's how to change your date format Learn how to set and change date formats in Google Sheets effortlessly. Opens in new tab automatically across your sheet or across a range Understand how to define and work with ranges in your spreadsheets. Opens in new tab of cells Learn about cell references and how to manipulate them in your sheets. Opens in new tab or a column, anything like that.<br>10:30 Hopefully that's helped you and hopefully it'll make your spreadsheets better.</div>
Courses
Selling Spreadsheets Course Introduction
How To Change Date Format Automatically
What Sucks About Selling Spreadsheets And How to Solve These Problems
SECTION 1 - You Are The Sheet
Make a Tour of Your Sheet
Coupon Code Maker Updates February 2024 - New Dashboard
How to Make Good Looking Spreadsheets
Curate Google Sheets Easily - Automatic Bookmarklet Maker
Explore Your Spreadsheet Selling Options
What you know matters
Who you are matters
How you think matters
Why you think it matters, matters
Surprising Things about Selling Spreadsheets
SECTION 2 - Your Spreadsheet Blueprint
Easiest Sheet Ever to Sell
Problems Everywhere, and the Spreadsheets that Solve Them
The #1 Mistake Spreadsheet Sellers Make and how to Save People Time
Customer’s Context Is King
The Two T’s: Turn Templates into Tools
Create a Branded Lead Magnet from Qualitative Data
Tracker Tactics
SECTION 3 - How to Make a Spreadsheet
Ask Questions
Quality Curation
Fabulous Filters
Wield Wizardry
Automatic Calculations
Automate Emails
You Must Double Duplicate (If you're selling a sheet you use)
Different Kinds of Automation
How do I prevent people from sharing my spreadsheets by making a copy?
SECTION 4 - Spreadsheet Sales Mastery
Write The Sales Page
The Strangest Secret to Selling a Spreadsheet
The F Word
Reciprocity Rules
Pricing Strategies for Spreadsheets
Upselling and Cross-Selling Techniques
Avoid A Multi-Tier Approach
SECTION 5 - Marketing Mastery
Where to Sell Spreadsheets - Marketplace Marketing
Customer Service is Marketing
Six Figure Secrets
How to Sell Spreadsheets on AppSumo Marketplace
Protect Your Spreadsheet IP
Lock Your Sheets with OnlySheets
Weird Idea: Find a Great Sheet Domain Name
A Few New Spreadsheet Business Ideas
SECTION 6 - Spreadsheet Breakdowns
Maximize Spreadsheet Sales to Startups
A Spreadsheet CRM: Automation at work
How to Make Better Lead Magnets
How to Turn a Simple List into an Epic Lead Magnet
The Art of the Sell: Breaking down a Free Title Generator
How to Make an AI Integrated Freebie Spreadsheet
Weekly Email Sheet as Lead Magnet
Spreadsheet Automation 101: Introduction to Pre-course Videos
Think Like a Programmer: Develop The Mindset of an Apps Script Coder
How To Change Date Format Automatically
Tips to Navigating Thousands of Lines of Code In Apps Script
Spreadsheet Automation 101: Functions
Spreadsheet Automation 101: Variables
Spreadsheet Automation 101: Dot Notation
Spreadsheet Automation 101: Camel Case
Spreadsheet Automation 101: Parentheses
Spreadsheet Automation 101 Lesson 1: GetValue - Introduction to SpreadsheetApp
Spreadsheet Automation 101 Lesson 1: Spreadsheet Taxonomy
Spreadsheet Automation 101 Lesson 1: A1 Notation vs Row,Column Syntax
Spreadsheet Automation 101 Lesson 1: getActiveSpreadsheet() vs getActiveSheet()
Spreadsheet Automation 101 Lesson 1: onOpen() Trigger - Custom Menu
This Seems Like Automation
Spreadsheet Automation 101 Lesson 2: Get Values - Introduction
Spreadsheet Automation 101 Lesson 2: Arrays
Spreadsheet Automation 101 Lesson 2: For Loop
Spreadsheet Automation 101 Lesson 2: Bracket Notation
Spreadsheet Automation 101 Lesson 2: Logger.log()
Spreadsheet Automation 101 Lesson 2: If ( ){ } and Checkboxes
Spreadsheet Automation 101 Lesson 2: onEdit() Trigger
Introduction to Spreadsheet Automation 101 Lesson 3
Spreadsheet Automation 101 Lesson 3: MailApp
Spreadsheet Automation 101 Lesson 3: Email Yourself For Loop
Spreadsheet Automation 101 Lesson 3: Send Email Every Week Trigger
Spreadsheet Automation 101 Lesson 3: Email Other People For Loop
Spreadsheet Automation 101 Lesson 4: Access APIs Introduction
Spreadsheet Automation 101 Lesson 4: UrlFetchApp
Spreadsheet Automation 101 Lesson 4: OmdbAPI get ApiKey, get Data in URL
Spreadsheet Automation 101 Lesson 4: OmdbAPI get data in Apps Script
Spreadsheet Automation 101 Lesson 4: JSON (beautifier) and OmdbAPI parameters
Spreadsheet Automation 101 Lesson 4: OmdbAPI Parameter Picker
Automatically Clear Content | Refresh Reuse Recycle Templates
Automate Google Sheets With Zero Experience
Automatically Uncheck A Daily Checklist
Activate A Certain Sheet When Opening a Spreadsheet
Scoping Functions in Apps Script
Breaking Through Errors In Apps Script
VAR vs CONST vs CONSTANT in Apps Script