20 C
London
Wednesday, July 23, 2025
HomeSoftware TutorialsGoogle SheetsHow to Generate Random Dates in Google Sheets

How to Generate Random Dates in Google Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following basic syntax to generate a random date between two dates in Google Sheets:

=TO_DATE(RANDBETWEEN(DATE(2015,1,1),DATE(2022,12,31))) 

This particular formula will generate a random date between 1/1/2015 and 12/13/2022.

The following example shows how to use this formula in practice.

Example: Generate Random Dates in Google Sheets

We can type the following formula in cell A2 to generate a random date between 1/1/2015 and 12/31/2022:

=TO_DATE(RANDBETWEEN(DATE(2015,1,1),DATE(2022,12,31))) 

The following screenshot shows how to use this formula in practice:

We can see that the formula produced the date 4/30/2018.

If we click and drag this formula down to other cells in column A, the formula will automatically produce a list of random dates between 1/1/2015 and 12/31/2022:

The result is a list of 20 date that all fall between 1/1/2015 and 12/31/2022.

Note #1: Whenever you update the value of any other cell in the worksheet and press Enter, the value of the random dates will change.

Note #2: If you don’t use the TO_DATE() function in the beginning of the formula, the random date that is generated will be formatted as a numeric value instead of a date.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

How to Add & Subtract Years from Date in Google Sheets
How to Sort by Date in Google Sheets
How to AutoFill Dates in Google Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories