How to Convert Text Date Ddmmyy To Mmddyy in Excel
Learn multiple Excel methods to convert text date ddmmyy to mmddyy with step-by-step examples and practical applications.
How to Convert Text Date Ddmmyy To Mmddyy in Excel
Why This Task Matters in Excel
In real-world data flows, dates are pivotal. They drive financial close schedules, production timetables, marketing reports, and compliance submissions. Yet incoming data seldom arrives in the tidy, locale-friendly format our workbooks expect. One of the most common headaches is the six-digit text date structured as day-day-month-month-year-year (ddmmyy). European ERP extracts, older CSVs from legacy databases, and flat-file exports from point-of-sale systems often encode dates in this compact text form to save space. The problem appears trivial until you must combine that data with North-American systems that insist on month-day-year (mmddyy) or, even worse, require a genuine Excel serial date to perform time-series calculations.
Imagine receiving daily sales feeds from your French retail branches where “070323” represents 7 March 2023. Your U.S. headquarters dashboard uses Power Query and pivot tables that assume the month comes first. If you attempt to add the feed straight into existing models, lookups fail, pivot groups misalign, and time intelligence functions such as NETWORKDAYS generate spurious outputs. Ultimately, revenue reports become unreliable, leading to poor operational decisions.
Mastering the conversion from text ddmmyy to mmddyy therefore shields you from downstream chaos. It allows friction-free data integration, accurate trend analyses, and confident financial forecasting. Knowing how to transform dates also exemplifies a broader skill: converting text strings into real, analyzable values—be they numbers, monetary figures, or dates. Once you understand the underlying mechanics—string slicing, data-type coercion, and date serial construction—you are better equipped to handle other data-quality issues. Conversely, ignoring the topic means wasted hours of manual retyping, heightened risk of human error, and models that break the instant the next data file arrives.
Best Excel Approach
The most reliable technique combines Excel’s DATE function with the text-extraction functions LEFT, MID, and RIGHT. This triad isolates the day, month, and year components and then rebuilds them in the correct order while simultaneously converting the text to a true date serial. Once the serial exists, Excel can format it any way you like—including mmddyy—simply via cell formatting.
Why is this approach superior?
- It is immune to regional settings because you construct the date explicitly.
- It returns a real date, not just a re-ordered text string. That means you can subtract dates, compute differences, and feed them into dashboards without additional steps.
- It is entirely formula-based, so it works in any Excel version back to 2007—no Power Query or VBA dependencies.
Prerequisites: The original value must be exactly six characters and stored as text or a number that does not yet evaluate as a date. If the feed occasionally contains blanks or invalid rows, wrap the formula in IFERROR for robustness.
Recommended syntax:
=DATE(
2000 + RIGHT(A2,2), /* year 2000-2099 */
MID(A2,3,2), /* month */
LEFT(A2,2) /* day */
)
Alternative for explicit formatting without creating a serial (rarely preferred):
=TEXT(DATE(2000+RIGHT(A2,2),MID(A2,3,2),LEFT(A2,2)),"mmddyy")
Parameters and Inputs
- Source cell (A2 in examples): must contain a six-digit string like \"070323\". It may be a text value or a number.
- Day extraction: LEFT(text,2) isolates the first two characters.
- Month extraction: MID(text,3,2) begins at position three and grabs two characters.
- Year extraction: RIGHT(text,2) retrieves the last two characters, representing 00-99. The formula adds 2000 to handle years 2000-2099. For dates earlier than 2000 or spanning centuries, see the advanced example later.
- Optional wrapper: IFERROR(result,\"\") prevents #VALUE errors where the text is not six characters or not numeric.
- Data preparation: Ensure there are no leading or trailing spaces. Apply TRIM or VALUE when files contain inconsistent spacing or numbers stored as text with apostrophes.
- Validation: LENGTH must equal six and each segment must be within valid ranges (day 01-31, month 01-12). If your workflow cannot guarantee this, add a validation column or custom data-validation rule to flag suspect rows.
- Edge cases: Leap-year dates such as 290224 must map to a valid serial. DATE automatically handles this; however, do verify the year logic if your dataset includes years earlier than 2000.
Step-by-Step Examples
Example 1: Basic Scenario
Assume you receive a small CSV containing five historical promotion dates in column A. Cells [A2:A6] hold:
070323
140223
311222
020123
250523
- Insert a new column B titled “Converted Date”.
- In cell B2, enter:
=DATE(2000+RIGHT(A2,2),MID(A2,3,2),LEFT(A2,2))
- Press Enter. The result initially shows as a five-digit serial (e.g., 45003).
- With B2 selected, press Ctrl+1 to open Format Cells. Choose Custom and type
mmddyy. B2 now displays 030723, representing March 7 2023. - Copy B2 down through B6. The remaining dates convert to 022323, 123122, 010223, and 052523 respectively.
- Optional—replace the 2000 offset if your data spans multiple centuries. For example, use:
=DATE(IF(VALUE(RIGHT(A2,2))>50,1900,2000)+RIGHT(A2,2),MID(A2,3,2),LEFT(A2,2))
This categorizes 51-99 as 1951-1999 and 00-50 as 2000-2050.
7. Quick test: subtract B2 from B3 to confirm they behave like true dates. Excel returns 14, proving that 23 February 2023 occurred 14 days before 7 March 2023.
Troubleshooting tip: If you see pound ### symbols, the column is not wide enough. If you see ##### error values, the date is too early to format (earlier than 1900) or the formula produced an invalid date.
Example 2: Real-World Application
Scenario: You manage procurement schedules for a multinational manufacturer. Suppliers from the EU upload shipment manifests daily via SharePoint. The manifest contains a “Ship Date” column formatted as ddmmyy text. Your U.S.-based MRP workbook groups orders by month and region. Any date that is not in mmddyy serial form breaks the Power Pivot model.
Data snapshot in worksheet “Manifest”:
| A | B | C |
|---|---|---|
| Supplier | Ship Date | Units |
| Alpha | 060323 | 12,500 |
| Beta | 150323 | 8,940 |
| Gamma | 010423 | 19,200 |
Objective: Convert “Ship Date” to a real date in column D of the same sheet and then append the field to the Power Pivot data model.
Steps:
- Insert column D labeled “Ship Date US”.
- Confirm the text nature of column B by selecting it and looking at the Number Format drop-down; it reads “General”.
- In D2, type:
=DATE(2000+RIGHT(B2,2),MID(B2,3,2),LEFT(B2,2))
- Copy the formula down.
- Format column D as mmddyy. Now you see 030623, 031523, 040123.
- Press Ctrl+T to convert range [A1:D4] into an official Table named “ShipTbl”. Excel automatically fills formulas for new rows.
- Go to Power Pivot ➜ Manage ➜ Existing Connections ➜ Add ShipTbl. Because column D is a true date, DAX time-intelligence functions like TOTALYTD work without complaint.
- When suppliers upload tomorrow’s manifest, paste the new rows underneath the table. Column D autoconverts, and your Power Pivot refresh is seamless.
Performance considerations: In a manifest with 50,000 rows, the DATE+MID+LEFT+RIGHT combo remains lightweight. Still, prefer structured references for clarity:
=DATE(2000+RIGHT([@Ship Date],2),MID([@Ship Date],3,2),LEFT([@Ship Date],2))
Structured references maintain readability and reduce formula errors when columns shift.
Example 3: Advanced Technique
Edge case: Mixed date lengths (some 6-digit, some 8-digit ddmmyyyy) and occasional blanks. Additionally, historical archives include 1990-1999 shipment dates. You need a single robust formula.
Approach:
- Clean spaces using TRIM and guarantee text by prefixing with an empty string.
- Evaluate length with LEN to branch logic.
- Compute century dynamically based on a cut-off year.
- Handle blanks via IF.
Formula in E2 (data in column B):
=IF(LEN(TRIM(B2))=0,"",
LET(
txt,TRIM(B2),
d,LEFT(txt,2),
m,MID(txt,3,2),
y,IF(LEN(txt)=8,RIGHT(txt,4),RIGHT(txt,2)),
yr,IF(LEN(y)=4,VALUE(y),
IF(VALUE(y)>50,1900+VALUE(y),2000+VALUE(y))),
DATE(yr,VALUE(m),VALUE(d))
)
)
Explanation:
- LET assigns names to components, improving readability and performance (available in Microsoft 365).
- If the original string has eight characters, the year is already four digits.
- For two-digit years, values 51-99 map to 1951-1999; 00-50 map to 2000-2050.
- Blank cells return blank results, preserving row integrity.
Professional tip: Wrap the entire function in IFERROR to catch anomalies such as \"321399\" where the day is invalid.
When to use this vs. simpler formula: Apply this advanced construct in enterprise-grade ETL where date irregularities are frequent, and reusability of logic is paramount. In day-to-day ad-hoc analysis, the basic DATE+MID+LEFT+RIGHT formula suffices.
Tips and Best Practices
- Always convert to a real date first, then re-format. Simply rearranging the text may satisfy visuals but breaks calculations.
- Add data validation: Use a custom rule
=AND(ISNUMBER(--A2),LEN(A2)=6)to flag corrupt imports early. - Store formulas in an Excel Table so new rows inherit conversions automatically.
- Center your year-cut-off logic on business context. A logistic archive dating back to 1985 should probably map years 85-99 to 1985-1999, not 2085-2099.
- For large files, keep helper columns hidden rather than deleted during development. They aid debugging and future audits.
- Document assumptions (e.g., 2000 base year) in a separate “Data Rules” sheet so colleagues understand why 990101 converts to 01-01-1999.
Common Mistakes to Avoid
- Treating the result as text: Users often wrap the conversion inside TEXT too early, producing a nice mmddyy string that no longer behaves as a date. Fix by applying number formatting instead of TEXT, or store both variations separately.
- Forgetting to coerce text numbers: Numeric cells with leading zeros vanish (070323 becomes 70323). The LEFT/MID/RIGHT logic then misaligns. Prevent this by formatting source columns as Text before import, or prefixing an apostrophe in the CSV generator.
- Ignoring two-digit year ambiguity: Assuming every \"23\" is 2023 causes historical misstatements. Implement cut-off logic or use four-digit years where possible.
- Omitting error handling: A rogue “ABCD23” entry propagates #VALUE down pivot models. Surround formulas with IFERROR or data-validation rules for cleaner outputs.
- Hard-coding cell references: Inserting columns later breaks column-based references. Use structured references or the INDEX column number method to maintain robustness.
Alternative Methods
While DATE+MID+LEFT+RIGHT is most portable, other methods may suit specific workflows.
| Method | Pros | Cons | Best For |
|---|---|---|---|
TEXT function only, e.g., =TEXT(A2,"mmddyy") | Super short | Works only if Excel already recognizes value as date; fails on text | Data already imported as dd/mm/yy serial |
| Power Query Split + Merge | GUI driven, no formulas | Requires 2016+ or add-in; refresh overhead | Repeated ETL pipelines |
| VBA User Defined Function | Extreme flexibility | Requires macros enabled; security prompts | Automating across multiple files overnight |
| Flash Fill | One-off, intuitive | Manual, not dynamic; breaks on new rows | Quick ad-hoc clean-up |
Power Query comparison: Splitting column [Ship Date] into three new columns and using the “Merge Columns” feature in M-code can also build mmddyy strings, then change type to Date. It scales well for hundreds of thousands of rows but introduces dependency on the query layer. If your company standardizes on Power Query, this may be preferable.
FAQ
When should I use this approach?
Use the DATE+MID+LEFT+RIGHT formula when your source contains six-digit text dates, you need full backward compatibility, and you want a genuine date serial that survives sort, filter, and time-intelligence operations.
Can this work across multiple sheets?
Yes. Reference an external sheet like =DATE(2000+RIGHT(Feeds!A2,2),MID(Feeds!A2,3,2),LEFT(Feeds!A2,2)). Keep source sheet names static or employ named ranges to avoid broken links when files restructure.
What are the limitations?
Two-digit years create ambiguity. Without additional logic, the formula assumes 2000-2099. It also presumes the string is exactly six digits long and correctly ordered ddmmyy. Non-numeric characters or variable lengths require the advanced LET-based version or data-validation safeguards.
How do I handle errors?
Wrap the main formula in IFERROR(dateFormula,"Invalid"). For proactive defense, combine data validation rules or the FILTER function to isolate suspicious rows for manual review.
Does this work in older Excel versions?
Yes. The core DATE+MID+LEFT+RIGHT formula works in Excel 2007 onward. LET is available only in Microsoft 365 and Excel 2021; however, you can rewrite LET logic into nested functions for earlier versions.
What about performance with large datasets?
On 100,000-row sheets, the basic formula recalculates almost instantly because LEFT, MID, RIGHT, and DATE are lightweight. For multi-million-row scenarios, move the transformation to Power Query or SQL before it reaches Excel to avoid hitting the grid row limit.
Conclusion
Converting ddmmyy text strings into mmddyy dates is more than a cosmetic task—it is a gatekeeper step that empowers every downstream calculation in your workbook. By leveraging Excel’s DATE function alongside simple text parsing, you create clean, locale-agnostic serial dates ready for anything from basic arithmetic to complex business intelligence models. Master this procedure now, and you will spend less time firefighting data-quality issues and more time generating insights. Next, explore automating the workflow with Power Query or learning dynamic array functions such as TEXTSPLIT to broaden your Excel toolkit. Happy converting!
Related Articles
How to Show the 10 Most Common Text Values in Excel
Learn multiple Excel methods to list the 10 most frequent text values—complete with step-by-step examples, business use cases, and expert tips.
How to Abbreviate Names Or Words in Excel
Learn multiple Excel methods to abbreviate names or words with step-by-step examples and practical applications.
How to Abbreviate State Names in Excel
Learn multiple Excel methods to abbreviate state names with step-by-step examples, professional tips, and real-world applications.