DD/MM/YYYY MM/YYYY ലേക്ക് പരിവർത്തനം
15/01/2025 → 01/2025
ദ്രുത കൺവെർട്ടർ
→
01/2025
DD/MM/YYYY എങ്ങനെ MM/YYYY ലേക്ക് പരിവർത്തനം ചെയ്യാം
DD/MM/YYYY ൽ നിന്ന് MM/YYYY ലേക്ക് പരിവർത്തനം തീയതി ഘടകങ്ങൾ പുനക്രമീകരിക്കൽ ഉൾക്കൊള്ളുന്നു:
നിന്ന്
DD/MM/YYYY
15/01/2025
ലേക്ക്
MM/YYYY
01/2025
1
ഭാഗങ്ങൾ തിരിച്ചറിയുക
DD/MM/YYYY ൽ: Day-Month-Year format commonly used in Europe, Asia, and most of the world
2
പുനക്രമീകരിക്കുക
MM/YYYY ഫോർമാറ്റുമായി പൊരുത്തപ്പെടാൻ പുനക്രമീകരിക്കുക: Month-year format commonly used for credit cards, expiration dates, and monthly reports
3
സെപ്പറേറ്റർ ക്രമീകരിക്കുക
ആവശ്യമെങ്കിൽ സെപ്പറേറ്റർ "/" ൽ നിന്ന് "/" ലേക്ക് മാറ്റുക.
കോഡ് ഉദാഹരണങ്ങൾ
JavaScript
// DD/MM/YYYY MM/YYYY ലേക്ക് പരിവർത്തനം
function convertDate(dateStr) {
// DD/MM/YYYY പാഴ്സ് ചെയ്യുക
const parts = dateStr.split('/');
const [day, month, year] = parts;
// MM/YYYY ആയി ഫോർമാറ്റ് ചെയ്യുക
return `${year}-${month}-${day}`;
}
console.log(convertDate('15/01/2025')); // 01/2025
Python
from datetime import datetime
# DD/MM/YYYY MM/YYYY ലേക്ക് പരിവർത്തനം
date_str = '15/01/2025'
date = datetime.strptime(date_str, '%d/%m/%Y')
result = date.strftime('%Y-%m-%d')
print(result) # 01/2025