Random Date Generator
The random date generator produces dates uniformly distributed between two you choose, in four output formats. Every day in the range is equally likely, including the endpoints, which matters when the dates are being used to seed a test database.
How it works
The range is converted to a whole number of days, a day index is drawn uniformly, and the result is converted back. Working in whole days avoids the time-zone drift that appears when random milliseconds are added to a timestamp.
- ISO 8601 (2026-09-10), unambiguous, sorts correctly as text, and the only format worth storing.
- Day first (10/09/2026), the convention in most of the world.
- Month first (09/10/2026), the US convention, and identical in appearance to the above for the first twelve days of any month.
- Long (Thursday 10 September 2026), includes the weekday.
Examples
A five-year range in ISO format
From
2020-01-01
To
2026-12-31
Format
ISO 8601
Result
2023-04-17, 2021-11-02, 2026-08-29, 2020-06-13, 2025-01-30
The range spans 2,557 days, so each specific date has roughly a 1 in 2,557 chance. Dates cluster evenly across the years rather than towards either end.
The ambiguity of the numeric formats
Date
2026-09-10
Result
Day first: 10/09/2026 · Month first: 09/10/2026
The same date renders as two different-looking strings, and each is a valid reading of the other. This is exactly why ISO 8601 exists.
Frequently asked questions
Are the dates evenly distributed across the range?
Yes. The range is converted to whole days and a day is drawn uniformly, so each day has an equal chance. There is no weighting towards recent dates or towards weekdays.
Does it exclude weekends or holidays?
No. Every day in the range is eligible, so about two in seven results fall on a weekend. If you need business days only, generate a larger batch and filter.
Are the endpoints included?
Yes, both. A range from 1 January to 31 January can return either of those dates, and covers 31 possible days rather than 29.
Which format should I use for stored data?
ISO 8601, always. It sorts correctly as plain text, has no day-month ambiguity, and is what every date parser accepts without a format hint. The other three are for display only.