A file from Europe writes 3 April 2024 as 03/04/2024. A file from the United States writes the same date as 04/03/2024. If the import guesses wrong, your posts get the wrong publish dates, or a date such as 15/03/2024 is not understood at all. Import Export by RockStarLab lets you say how the dates in the file are written, so every post keeps its real date.
Free: everything here is in the free plugin. Use version 2.2.0 or newer: it adds the Dates in the File option.
The file
Our file has four news posts of a market website, with dates written day first, one of them with a time:

03/04/2024 is 3 April and 02/12/2024 is 2 December. Read month first, they would become 4 March and 12 February.
Step 1: Upload the file and map the Date column
Open Import Export → Import, choose Posts, upload the CSV file and continue to the mapping step. Click Auto Map. A column named Date is mapped to post_date, the publish date of the post:

If your column has another name, drag it to Date in the WordPress fields. A column named Published is not used for the date: in exports from Shopify and other stores it holds TRUE or FALSE, so Auto Map maps it to the status.
Step 2: Choose how dates are written
In step 5, Import Options, set Dates in the File:

- Day first (DD/MM/YYYY): for files from Europe and most other countries. We chose this one.
- Month first (MM/DD/YYYY): for files from the United States.
- Detect automatically (default): a date whose first number is above 12, such as 15/09/2024, is read day first, and 09/15/2024 month first. When both numbers are 12 or less, as in 03/04/2024, a date with slashes is read month first and a date with dots or dashes (03.04.2024) day first.
Dates written as 2024-04-03, or with the month as a word (3 April 2024), are clear and are read the same way with every setting.
Step 3: Import and check the dates
Click Start Import. Our 4 posts were created in a second. The posts list shows the dates from the file, including the time 8:00 of the second row:

With Detect automatically, the same file would have given 4 March, 6 January, 15 September and 12 February: only the third date is unambiguous.
Tips
- Check one row first. Import a file with one row, open the post and look at the date before you import thousands.
- Times. A time after the date (01/06/2024 08:00) is kept. Dates without a time get midnight.
- Time zone. Dates are read in the site’s time zone (Settings → General).
- Future dates. A published post with a date in the future gets the current date, as WordPress would otherwise schedule it. Use the status
futureto schedule posts. - Templates. Save as Template keeps the date setting with the mapping, so the next file from the same source is read the same way.
An import with the wrong setting changes the dates of all posts it updates. Back up the site before importing, or ask your AI agent to start the backup.
With an AI agent
An AI agent connected to the site through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can do the same import:
Without the plugin, WordPress 7.1.5 gives a connected agent only three read-only abilities for site, user and environment information. The exports, imports and syncs in the requests below are abilities of Import Export by RockStarLab.
With Import Export by RockStarLab, import market-news.csv as posts. The dates in the file are day first.
In our run, the agent uploaded the file with rsl-ie/upload-create, upload-chunk and upload-complete, then called rsl-ie/import-start with the four columns mapped and options.date_order set to dmy. Job 101 finished with 4 posts, dated 3 April, 1 June at 8:00, 15 September and 2 December 2024.
FAQ
Does the setting apply to ACF date fields?
Yes. ACF Date Picker and Date Time Picker cells are first read in the field’s own display and return formats; numeric dates that don’t match them follow the same setting.
What about a date that doesn’t exist, such as 31/02/2024?
That row is not imported: the result shows it as failed with the message “Invalid date.” Fix the cell in the file and import that row again.
Can I fix dates of posts that were already imported wrong?
Yes. Import the same file again with the right setting and If Match Found set to Update, matched by title or slug. The dates are replaced.
Does Excel change the dates?
It can. Excel may turn dates into its own format when it saves a CSV. See Excel leading zeros, dates and scientific notation in CSV files.
Related Guides
- Excel Leading Zeros, Dates and Scientific Notation in CSV Files
- Move WordPress Posts and Keep Dates, Authors and Slugs
- Admin Colors, Row Filter and Day-First Dates (What’s New in 2.2.0)
Get the free plugin on WordPress.org.

Comments 0
Have a question or a tip to share? Leave it below.