Guides · For agents
Convert mixed date formats to YYYY-MM-DD in a CSV
Ask your agent to run Sift's date_format fix with to set to YYYY-MM-DD and the day and month order your file uses. Every date it can read for certain is rewritten, and the rest are flagged, never guessed. In the test bookings file, 5 of 10 dates change and 3 are flagged.
Ask your agent
With Sift connected (setup takes three steps), paste this and swap in your own paths.
Use Sift with /path/to/rules.bookings.json on /path/to/bookings_export.csv. Dry run date_format on the arrival column, to YYYY-MM-DD, with order day_first. Tell me what would change and what was flagged, then apply it if I say yes, raising the limit to 50% for this job only.
Half the dates change, and this rules file keeps the usual limit: {"guardrails": {"stop_if_share_of_rows_changed_over": 0.2}}. So the dry run warns that Sift would stop, and an apply without a raise does stop. Asking for 50% for this job only (maxShareChanged) lets it through and leaves the rules file as it is.
What Sift sends back
With day_first, 03/04/2026 becomes 2026-04-03, the 3rd of April, and 7/7/2026 becomes 2026-07-07.
Why you give the order
A date like 03/04/2026 could be 3 April or 4 March. Without an order, Sift flags it with the reason day and month could be either way round: on the same file, 4 dates change and 4 are flagged. A date like 14/03/2026 can only be one way, so it changes either way.
Set order to day_first or month_first in the prompt, or once as date_order in the rules file. If your trouble is a CRM reading dd/mm as mm/dd on import, see CSV date format for a CRM import.
What to do next
- Look at the three flagged dates at the source. YYYY-MM-DD would drop the 15:00, 05/05/26 doesn't say which century, and the 30th of February doesn't exist.
- Need another format? Give
toas DD/MM/YYYY or D MMM YYYY instead. The same dry run, receipt and undo apply. - Keep the receipt with the new file. It records every old and new date.
Questions
Yes. Name it with to, such as DD/MM/YYYY, D MMM YYYY or MMMM D, YYYY.
Because YYYY-MM-DD has no time in it, so rewriting would drop the time. Sift leaves it as written for you to decide.
Fixes work on CSV, which is what makes the undo exact. Save the sheet as CSV first, then point your agent at the CSV.
One file, no agent? Clean a file by hand in your browser, with nothing uploaded.