⚙️ Settings
Date Range Generator — Generate a List of Dates Between Two Dates
The Date Range Generator creates every date between a start and end date at daily, weekly, or monthly intervals, in the date format of your choice. It's built for analysts and developers who need to generate a list of dates between two dates for building test data, populating a calendar, or creating a lookup table of reporting periods — without manually typing out every date.
⚡ Key Takeaways
- Generates every date in a range at daily, weekly, or monthly intervals.
- Choose your own output date format before generating the list.
- Monthly intervals can shift near month-end due to differing month lengths.
- A fast way to build test data or reporting period boundaries.
What, Who, When & Why
| What it's for | Generates every date between a start and end date at daily, weekly, or monthly intervals. |
|---|---|
| Who it's for | Analysts and developers building test data, calendars, or reporting period boundaries. |
| When to use it | When you need a complete list of dates for a range rather than typing each one out individually. |
| Why it's needed | Manually typing out a date range — especially daily over weeks or months — is slow and easy to get wrong, particularly around month-end. |
| Best way to use it | Pick an output format that matches what your destination system expects, so you don't need to reformat the list afterward. |
How to Use the Date Range Generator
- Set your start date and end date.
- Choose an interval: daily, weekly, or monthly.
- Choose your preferred output date format.
- The generated list of dates appears instantly in the Output box.
- Click Copy to grab the full list.
Example
Setting a start date of 2024-01-01, end date of 2024-01-05, and a daily interval generates:
2024-01-01 2024-01-02 2024-01-03 2024-01-04 2024-01-05
Switching to a weekly interval over a longer range (say, the full month of January) would instead generate five dates spaced seven days apart, useful for creating weekly reporting checkpoints rather than every single day. A monthly interval over a full year would produce twelve dates, one per month, ideal for annual reporting templates.
Key Features
- Daily, weekly, and monthly interval options.
- Customizable date output format.
- Generates every date in the range automatically, with a live count shown.
- One-click copy of the full generated list.
Practical Use Cases
- Building test data: generate a sequence of dates to populate a test database or spreadsheet.
- Calendar generation: create a list of dates for scheduling or event-planning tools.
- Reporting periods: generate monthly or weekly boundaries for a reporting dashboard.
- Filling gaps in a dataset: generate a complete date range to cross-reference against actual data and spot missing days.
- Populating dropdown or filter options: create a list of selectable dates for a form or filter menu.
Tips for Best Results
- Choose a date format that matches what your destination system expects, to avoid needing to reformat the list afterward.
- For monthly intervals, be aware that dates near the end of a month can shift slightly depending on how many days are in each month.
- Use the generated list with the SQL Value Generator afterward to quickly build a quoted, comma-separated date list for a SQL query.
Related Terminology
A date range is the span between a start and end date. An interval defines how frequently dates are generated within that range — daily generates every single date, while weekly and monthly generate dates spaced further apart, typically counted from the start date rather than aligned to calendar week or month boundaries.
Important Considerations
Monthly intervals can produce dates that land on different days of the month if the start date falls near the end of a month (for example, starting on the 31st in a month that doesn't have 31 days) — check the generated output if your use case is sensitive to exact day-of-month consistency. Weekly intervals count exactly seven days from the start date, rather than aligning to a specific day of the week like Monday, unless your start date itself falls on that day.
Related Tools
Need to convert generated dates into Unix timestamps? Use the Epoch Converter. To calculate how many days remain until a specific date instead of generating a range, try Time Till. Once generated, wrap the dates into a SQL-ready list with the SQL Value Generator.
Frequently Asked Questions
How do I generate a list of dates between two dates?
Set your start and end dates, choose an interval, and the full list of dates in that range is generated instantly in your chosen format.
Can I generate weekly or monthly dates instead of every day?
Yes, choose a weekly or monthly interval instead of daily to generate dates spaced further apart.
Can I customize the date format?
Yes, you can choose your preferred output date format before generating the list.
Does the weekly interval align to a specific day like Monday?
No, it counts exactly seven days from your start date each time, so the day of the week matches whatever your start date falls on rather than a fixed calendar day.
WITH recent_orders AS (
SELECT
customer_id,
order_id,
order_date,
total_amount
FROM orders
WHERE order_date >= DATEADD(day, -30, GETDATE())
)
SELECT
customer_id,
COUNT(order_id) AS order_count,
SUM(total_amount) AS total_spent
FROM recent_orders
GROUP BY customer_id
ORDER BY total_spent DESC;
WITH RECURSIVE employee_hierarchy AS (
-- Anchor: top-level rows (no manager)
SELECT
employee_id,
manager_id,
employee_name,
1 AS level
FROM employees
WHERE manager_id IS NULL
UNION ALL
-- Recursive: join children to their parent's result
SELECT
e.employee_id,
e.manager_id,
e.employee_name,
eh.level + 1
FROM employees e
INNER JOIN employee_hierarchy eh
ON e.manager_id = eh.employee_id
)
SELECT *
FROM employee_hierarchy
ORDER BY level, employee_name;
-- Note: SQL Server / Oracle: drop the RECURSIVE keyword (just WITH employee_hierarchy AS (...))
SELECT
o.order_id,
c.customer_name,
o.order_date,
p.product_name,
oi.quantity
FROM orders o
INNER JOIN customers c
ON o.customer_id = c.customer_id
LEFT JOIN order_items oi
ON o.order_id = oi.order_id
LEFT JOIN products p
ON oi.product_id = p.product_id
WHERE o.order_date >= '2026-01-01'
ORDER BY o.order_date DESC;
SELECT
DATE_TRUNC('month', order_date) AS order_month, -- PostgreSQL
-- FORMAT(order_date, 'yyyy-MM') AS order_month, -- SQL Server
-- DATE_FORMAT(order_date, '%Y-%m') AS order_month, -- MySQL
COUNT(*) AS order_count,
SUM(total_amount) AS revenue
FROM orders
GROUP BY DATE_TRUNC('month', order_date)
ORDER BY order_month;
SELECT
customer_id,
order_id,
order_date,
total_amount,
ROW_NUMBER() OVER (
PARTITION BY customer_id
ORDER BY order_date DESC
) AS order_rank,
SUM(total_amount) OVER (
PARTITION BY customer_id
ORDER BY order_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) AS running_total
FROM orders;
CREATE PROCEDURE GetCustomerOrders
@CustomerId INT,
@StartDate DATE = NULL,
@EndDate DATE = NULL
AS
BEGIN
SET NOCOUNT ON;
SELECT
order_id,
order_date,
total_amount
FROM orders
WHERE customer_id = @CustomerId
AND (@StartDate IS NULL OR order_date >= @StartDate)
AND (@EndDate IS NULL OR order_date <= @EndDate)
ORDER BY order_date DESC;
END;
-- Call it: EXEC GetCustomerOrders @CustomerId = 101, @StartDate = '2026-01-01';
MERGE INTO customers AS target
USING staging_customers AS source
ON target.customer_id = source.customer_id
WHEN MATCHED THEN
UPDATE SET
target.customer_name = source.customer_name,
target.email = source.email,
target.updated_at = GETDATE()
WHEN NOT MATCHED THEN
INSERT (customer_id, customer_name, email, created_at)
VALUES (source.customer_id, source.customer_name, source.email, GETDATE());
#FACC15
rgb(250, 204, 21)
rgb(98%, 80%, 8%)
hsl(46, 96%, 53%)
hsv(46, 92%, 98%)
cmyk(0%, 18%, 92%, 2%)
Tools for analysts, developers & QA engineers
33 free, browser-based utilities — text and list tools, SQL helpers, converters, and small productivity apps. Everything runs locally; nothing you type or paste is ever uploaded.
For Analysts
Clean lists, build SQL fragments, and reshape data without opening a spreadsheet.
For Developers
Format SQL, convert data formats, and handle everyday text and encoding tasks.
For QA Engineers
Generate test data, compare text output, and sanitize queries before sharing them.