|
|
|
ขอโค้ด แปลงวันที่จาก 25-04-2013 ไปเป็น 25 เมษายน 2556 ครับ |
|
|
|
|
|
|
|
ผมมีแต่ PHP ครับ
PHP Thai Date/Time Function
|
|
|
|
|
Date :
2013-04-26 10:19:37 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณครับ
|
|
|
|
|
Date :
2013-04-26 10:46:50 |
By :
pungpoo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตัวอย่างนะครับ
Code (JavaScript)
<script type="text/javascript">
function startTime(){
var daysThai = new Array("อาทิตย์ที่","จันทร์ที่","อังคารที่","พุทธที่","พฤหัสบดีที่","ศุกร์ที่","เสาร์ที่");
var daysEng = new Array("Sunday","Monday","Tuesday","Wednesday","Thuesday","Friday","Saturday");
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var monthnameT=new Array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");
var monthnum=new Array("01","02","03","04","05","06","07","08","09","10","11","12");
var today=new Date();
var mtoday = daysThai[today.getDay()]+" "+today.getDate() + " " + monthnameT[today.getMonth()] + " " +(today.getYear()+543)+" ";
var etoday = daysEng[today.getDay()]+" "+today.getDate() + " " + monthname[today.getMonth()] + " " +today.getFullYear()+" ";
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
var timeThai=" เวลา "+h+((m< 10) ? ":0" : ":") + m +((s< 10) ? ":0" : ":") + s +" ";
var timeEng=" Time "+h+((m< 10) ? ":0" : ":") + m +((s< 10) ? ":0" : ":") + s +" ";
document.getElementById('timeToDay').innerHTML=timeEng;
document.getElementById('ThaiDate').innerHTML=mtoday;
document.getElementById('EngDate').innerHTML=etoday;
t=setTimeout('startTime()',500);
}
</script>
|
|
|
|
|
Date :
2013-04-26 10:57:02 |
By :
Backer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2013-04-26 12:49:52 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|