Convert DD/MM/YYYY to MM/DD/YYYY
15/01/2025 → 01/15/2025
Quick Converter
→
01/15/2025
How to Convert DD/MM/YYYY to MM/DD/YYYY
Converting from DD/MM/YYYY to MM/DD/YYYY involves rearranging the date components:
From
DD/MM/YYYY
15/01/2025
To
MM/DD/YYYY
01/15/2025
1
Identify the Parts
In DD/MM/YYYY: Day-Month-Year format commonly used in Europe, Asia, and most of the world
2
Rearrange
Reorder to match MM/DD/YYYY format: Month-Day-Year format primarily used in the United States
3
Adjust Separator
Change the separator from "/" to "/" if needed.
Code Examples
JavaScript
// Convert DD/MM/YYYY to MM/DD/YYYY
function convertDate(dateStr) {
// Parse DD/MM/YYYY
const parts = dateStr.split('/');
const [day, month, year] = parts;
// Format as MM/DD/YYYY
return `${month}/${day}/${year}`;
}
console.log(convertDate('15/01/2025')); // 01/15/2025
Python
from datetime import datetime
# Convert DD/MM/YYYY to MM/DD/YYYY
date_str = '15/01/2025'
date = datetime.strptime(date_str, '%d/%m/%Y')
result = date.strftime('%m/%d/%Y')
print(result) # 01/15/2025