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