All Tools

Date Generator

Generate random dates within a specified range. Perfect for testing and sampling.

Date Generator

Generated Dates

  • December 25th, 2026 8:17 AM
  • May 25th, 2027 7:56 PM
  • July 5th, 2027 1:25 PM
  • January 2nd, 2027 2:20 AM
  • June 27th, 2027 7:21 AM

Date generator

Generate random dates

Create random dates within a specified range using the formula:

textrandomDate=textstartDate+textrandom(0,textdaysInRange)\\text{randomDate} = \\text{startDate} + \\text{random}(0, \\text{daysInRange})

Where daysInRange is the number of days between the start and end dates.

Worked example

Generate a random date between 1 January 2025 and 31 December 2025:

  1. Start date: 1 January 2025
  2. End date: 31 December 2025
  3. Days in range: 365 - 1 = 364 days
  4. Random offset: 142 days (example)
  5. Result: 1 January + 142 days = 22 May 2025

Result: 22 May 2025 (example - actual result will vary)

How to use

  1. Enter the start date (earliest possible date)
  2. Enter the end date (latest possible date)
  3. Optionally specify if you want only weekdays or weekends
  4. Click "Generate" to create a random date
  5. Use the "Generate multiple" option to create a list of dates

Date range constraints

  • Start date must be before or equal to end date
  • Date range cannot exceed 10 years
  • Dates must be within the valid JavaScript Date range (approximately 100,000 BCE to 100,000 CE)

Common use cases

  • Generating test data for applications
  • Creating random dates for surveys and polls
  • Selecting random dates for raffles or lotteries
  • Simulating historical events for educational purposes
  • Planning random events or reminders

Generating multiple dates

To generate multiple random dates:

  1. Enter your date range
  2. Specify the number of dates you need
  3. Choose whether to allow duplicates
  4. The tool generates a list of dates in chronological order

FAQ

Can I generate dates in the past? Yes, enter a past start and end date.

Can I generate dates in the future? Yes, enter a future start and end date.

Can I generate only business days? Yes, use the "Weekdays only" option to exclude weekends.

Can I generate only weekends? Yes, use the "Weekends only" option to include only Saturdays and Sundays.

Are the dates truly random? Yes, the tool uses a cryptographically secure random number generator.

Can I export the generated dates? Yes, copy the list or use the download option if available.

Other related tools