DD/MM/YYYY ကို YYYY-MM သို့ ပြောင်းရန်

15/01/2025 → 2025-01

အမြန်ပြောင်းလဲကိရိယာ

2025-01

DD/MM/YYYY ကို YYYY-MM သို့ ဘယ်လိုပြောင်းမလဲ

DD/MM/YYYY မှ YYYY-MM သို့ ပြောင်းခြင်းတွင် ရက်စွဲအစိတ်အပိုင်းများ ပြန်စီရန်ပါဝင်သည်:

မှ
DD/MM/YYYY
15/01/2025
သို့
YYYY-MM
2025-01
1

အစိတ်အပိုင်းများခွဲခြား

DD/MM/YYYY တွင်: Day-Month-Year format commonly used in Europe, Asia, and most of the world

2

ပြန်စီပါ

YYYY-MM ပုံစံနှင့်ကိုက်ညီရန် ပြန်စီပါ: Year-month format following ISO 8601, ideal for file naming and sorting

3

ခြားနားကိရိယာချိန်ညှိ

လိုအပ်ပါက ခြားနားကိရိယာကို "/" မှ "-" သို့ ပြောင်းပါ။

ကုဒ်ဥပမာများ

JavaScript
// DD/MM/YYYY ကို YYYY-MM သို့ ပြောင်းရန် function convertDate(dateStr) { // DD/MM/YYYY ခွဲခြမ်းရန် const parts = dateStr.split('/'); const [day, month, year] = parts; // YYYY-MM အဖြစ် ပုံစံချရန် return `${year}-${month}-${day}`; } console.log(convertDate('15/01/2025')); // 2025-01
Python
from datetime import datetime # DD/MM/YYYY ကို YYYY-MM သို့ ပြောင်းရန် date_str = '15/01/2025' date = datetime.strptime(date_str, '%d/%m/%Y') result = date.strftime('%Y-%m-%d') print(result) # 2025-01

အခြားပြောင်းလဲမှုများ

ပြောင်းလဲကိရိယာအပြည့် ဖွင့်ရန် →

ဆက်စပ်စာမျက်နှာများ