---
title: Export Orders from the Last X Days
description: How to export orders created or modified within the last X days in Shopware 6 using order delta filters.
---

Use this option when you want each export run to use a rolling time window instead of the last successful export date.

You can export orders created or modified within the last **X days**, where X is set by the user.

This extends the existing delta export functionality.

## Steps

To export orders created or modified in the last X days:

1. Open an **Export Profile**.
2. Set **Entity → Orders**.
3. In the **Filter** section, select:
    1. **Created X days ago** exports orders created in the last X days.
    2. **Modified X days ago** exports orders modified in the last X days.
        
        The X placeholder becomes a small numeric input field.
        
4. Enter an integer value greater than 0.
    
    ![](/images/order_export_x_days_ago.jpg)
    
5. Configure the remaining settings, save the profile, and run the export.

## Filtering Behavior

If X is provided:

- The app ignores the previous export run date.
- The filter is calculated as: `current profile run datetime - X days`
- A new relative time window is calculated for each run.

## Validation and Fallback Logic

- The input accepts whole numbers greater than 0.
- If the selected X-days option has no valid value:
    - A validation message is shown.
    - The system falls back to existing behavior:
        - Latest created
        - Latest modified

## Restriction

The X-days options follow the same delta export restriction as existing **latest-created/latest-modified** filters (`orders_delta_export` feature).

## Example

1. Today: Feb 17, 15:00
2. X = 7
3. Filter: Modified X days ago

Export includes orders updated after Feb 10, 15:00.
