WIT-Academy
21/01/2026
အားလုံးပဲ မင်္ဂလာပါ။
ဒီတစ်ပတ်မှာတော့ JavaScript ထဲက Date Time Format အမျိုးမျိုးကို ပြောင်းပုံကို မျှဝေပေးသွားမှာ ဖြစ်ပါတယ်။ Date Time Format တွေဆိုတာ UI မှာရော၊ System Ajax တွေအတွက်ပါ မရှိမဖြစ် အသုံးပြုနေကြတဲ့ အပိုင်းပဲ ဖြစ်ပါတယ်။
const date = new Date("2026-01-21T13:30:00Z");
TZ ဆိုတာကတော့ TimeZone ပဲ ဖြစ်ပါတယ်။
const now = new Date();
ဒီနေ့ ရက်စွဲကို ရယူခြင်း ဖြစ်ပါတယ်။
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
console.log(timeZone);
Time Zone ကို ရယူခြင်း ဖြစ်ပါတယ်။
const formatted = now.toLocaleString("en-US", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
timeZoneName: "short"
});
Output: 01/21/2026, 09:30:00 PM GMT+8
now.toISOString()
Output: 2026-01-21T13:30:00.000Z
const readableFormat = date.toLocaleString("en-GB", {
day: "2-digit",
month: "short",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
hour12: false,
timeZone: "UTC"
});
Output: 21 Jan 2026, 13:30
const sqlFormat = date
.toISOString()
.slice(0, 19)
.replace("T", " ");
Output: 2026-01-21 13:30:00
26/12/2025
အားလုံးပဲ မင်္ဂလာပါ။ 🙋
ဒီတစ်ပတ်မှာတော့ 【Basic Excel & Word Knowledge Sharing】ဆိုတဲ့ ခေါင်းစဉ်ဖြင့် ဝေမျှပေးသွားပါမယ်။
Youtube Channel Link :
Basic Excel & Word Knowledge Sharing အားလုံးပဲ မင်္ဂလာပါ🙋ဒီတစ်ပတ်မှာတော့ 【Basic Excel & WordKnowledge Sharing】ဆိုတဲ့ ခေါင်းစဥ်နှင့်ပတ်သက်ပြီး ဝေမျှပေးချင်ပါတယ်။blog က...
Click here to claim your Sponsored Listing.
Category
Contact the school
Telephone
Website
Address
Yangon
11081