About this tool
Test data needs dates: sign-up dates, order dates, birthdays, appointment slots, log timestamps. This random date generator picks dates (and optionally times) between any two days, and writes them in the format your database, spreadsheet or API expects.
How to use it
- Set the From and To dates. Both days are included.
- Choose a format. Turn on Include time for a random time of day, accurate to the second.
- Use Weekdays only for business dates, and Sort to get them in order, then copy or download the list.
Every day in the range is equally likely, and all dates and times are in UTC so the results are the same wherever you are. Unix timestamps count from 1 January 1970 UTC; use the Timestamp Converter to turn them back into dates.
Which format to choose
- ISO 8601 (
2025-03-14T09:30:00Z): JSON APIs and most programming languages. It sorts correctly as text. - SQL (
2025-03-14 09:30:00):DATETIMEandTIMESTAMPcolumns in MySQL, PostgreSQL and SQLite. - Unix seconds or milliseconds: databases that store numbers, JavaScript’s
Date(milliseconds), JWTexpclaims (seconds). - US or European (
03/14/2025vs14/03/2025): spreadsheets and forms for a particular audience. Beware: the same text means different days in each. - RFC 2822 (
Fri, 14 Mar 2025 09:30:00 +0000): email headers and HTTP.
FAQ
How do I generate a random date between two dates?
Set the From and To dates and click Generate. Every day in between, including both ends, is equally likely.
Can I include random times?
Yes. Turn on “Include time” to add a random time of day, accurate to the second, in UTC.
Can I exclude weekends?
Yes. Turn on “Weekdays only” and Saturdays and Sundays are skipped.
Which time zone are the dates in?
UTC, so the output doesn’t depend on your computer’s time zone. ISO timestamps end in Z to show this.