User Rating 4.0 ★★★★
Total Usage 17 times

Results

Is this tool helpful?

Your feedback helps us improve.

About

Generating random dates is a frequent requirement for software testing, populating calendars, or simulation scenarios. This tool allows you to pick a random point in time between a start and end date. It goes beyond simple randomization by offering a 'Business Days Only' filter, which algorithmically excludes Saturdays and Sundays from the possible results.

You can also control the output format, choosing between standard ISO 8601, US (MM/DD/YYYY), or European (DD/MM/YYYY) formats, and optionally include time components.

date generator random dates timestamp generator developer utilities data entry

Formulas

The core logic determines a random millisecond offset:

Time = Start + (Random() × (End - Start))

If the 'Business Days' filter is active, the algorithm checks:

  • Check Day. Calculate DayOfWeek (0=Sun, 6=Sat).
  • Validate. If Day is 0 or 6, discard and re-roll (or adjust to nearest Monday).
  • Format. Convert valid timestamp to string based on user selection.

Reference Data

Format NamePatternExample
ISO 8601YYYY-MM-DD HH:mm:ss2025-12-31 23:59:59
US StandardMM/DD/YYYY12/31/2025
EU StandardDD/MM/YYYY31/12/2025
Unix TimestampInteger (Seconds)1767225599

Frequently Asked Questions

Yes. The underlying JavaScript Date object correctly handles leap years (e.g., February 29th) when calculating ranges and validity.
Absolutely. Simply set your 'Start Date' to a past year (e.g., 1900) and your 'End Date' to today or another past date.
No. The filter currently only excludes weekends (Saturday and Sunday). Public holidays vary by country and are not automatically excluded.