MM/YYYY DD/MM/YYYY ට පරිවර්තනය
01/2025 → 15/01/2025
ඉක්මන් පරිවර්තකය
→
15/01/2025
MM/YYYY DD/MM/YYYY ට පරිවර්තනය කරන්නේ කෙසේද
MM/YYYY සිට DD/MM/YYYY ට පරිවර්තනයේදී දින කොටස් නැවත සකස් කිරීම ඇතුළත් වේ:
සිට
MM/YYYY
01/2025
ට
DD/MM/YYYY
15/01/2025
1
කොටස් හඳුනාගන්න
MM/YYYY හි: Month-year format commonly used for credit cards, expiration dates, and monthly reports
2
නැවත සකස් කරන්න
DD/MM/YYYY ආකෘතියට ගැළපෙන ලෙස නැවත සකස් කරන්න: Day-Month-Year format commonly used in Europe, Asia, and most of the world
3
වෙන්කරන්නා සකසන්න
අවශ්ය නම් වෙන්කරන්නා "/" සිට "/" ට වෙනස් කරන්න.
කේත උදාහරණ
JavaScript
// MM/YYYY DD/MM/YYYY ට පරිවර්තනය
function convertDate(dateStr) {
// MM/YYYY විග්රහ කරන්න
const parts = dateStr.split('/');
const [year, month, day] = parts;
// DD/MM/YYYY ලෙස ආකෘතිගත කරන්න
return `${day}/${month}/${year}`;
}
console.log(convertDate('01/2025')); // 15/01/2025
Python
from datetime import datetime
# MM/YYYY DD/MM/YYYY ට පරිවර්තනය
date_str = '01/2025'
date = datetime.strptime(date_str, '%Y-%m-%d')
result = date.strftime('%d/%m/%Y')
print(result) # 15/01/2025