Utilities
Random date and time
A random moment between two dates — accurate to the minute or day.
Set the dates to see the size of the range.
Why is a random date needed
Random dates are needed everywhere data that does not yet exist is required: to fill a table with test orders, to check the filter by period, to make sure that a reminder triggers a week before the event. Such sets are collected manually for a long time, and they turn out too 'even' — all the dates end up being the first day of the month.
The second area is creativity and decisions. A random day for a meeting, a cutoff date in a draw, 'how many weeks to remind.' The generator selects the moment equally likely from the entire range, so the result is not biased toward the beginning or middle.
How is the range calculated
Boundaries are included in full. If you select 'from January 1 to January 31' and include time, then a random moment will be uniformly distributed across all the minutes of these thirty-one days: from 00:00 on January 1 to 23:59 on January 31. Without time, the selection is done by days — the same interval, but 31 equally likely days instead of 44,640 minutes.
| Range | Days | Minutes |
|---|---|---|
| Week | 7 | 10 080 |
| Month | ≈ 30 | ≈ 43 200 |
| Year | 365 | 525 600 |
| 10 years | 3 650 | 5 256 000 |
Pay attention to the clock: the generator operates in the timezone of your browser. If the server and the computer are in different timezones, midnight will be different — this is important for test data, so it is better to explicitly specify the timezone in the data itself.
Formats and where they would be useful
- DD.MM.YYYY — usual records and documents;
- YYYY-MM-DD — ISO 8601: sorted as a string and understood by most APIs and databases;
- January 1, 2026 — for text, letters, and headings;
- happy [day of the] week — when it is important whether it is a workday or a day off.
A list sorted in ascending order is easier to read and immediately shows the spread. Randomness remains in the values themselves: the order does not affect the equal likelihood.
What is important to remember
- repeats are possible — selection is done with replacement, just like in real life;
- Boundaries are included, so a range of one day will give the same date;
- the transition to daylight saving time in some time zones shifts the hour, but not the date range;
- The calendar arithmetic of different libraries may differ at the month boundary.