Library › Data AI › Operations and supply chain
Clean a messy date column into ISO dates
- For Operations and supply chain
- You practice Asking for a format you can use
- Time about 5 minutes
- Level Intermediate
About this exercise
Your CSV export has a messy 'received' column and you need clean dates. All dates are US format (month first). Write one CSV block (one code block) with the header original,clean and one row per value, where clean is YYYY-MM-DD, or the word unclear if the date is impossible or cannot be read. At most 15 words outside the code block.
Common mistakes when you ask AI for this
- Assuming day first. The AI flips 3/4/25 to April 3 or guesses what 13/04/25 meant. Try: Add: "US format, month first."
- Guessing bad dates. The AI repairs 02/30/2025 or 13/04/25 into a real date. Try: Add: "Impossible dates and blanks: write unclear."
- Wrong CSV shape. The AI drops the header, reorders rows or adds columns. Try: Add: "Header original,clean, then 10 rows in the same order."
- Leaving the format to chance. The AI picks its own length and layout unless told the exact shape. Try: Add: "Put the code in exactly 1 code block. Keep the writing outside the code under 15 words."
What a strong prompt includes
- Names the format
- Says what to do with bad dates
- Names the output date style
- Asks for a CSV block
- Keeps row order
Related exercises
- Adapt one ad image to 3 sizes with Midjourney (Image & Video AI · Marketing and content)
- Age open requisitions as of today and flag the old ones (Finance AI · FP&A and financial analysts)
- Announce a new regional structure with a reporting table (Leadership AI · Executives)
- Announce a referral bonus with the steps to claim it (Marketing AI · HR and recruiting)
- Announce a schedule change in a text message under 45 words (Leadership AI · Small business owners)