คำตอบที่ได้รับเลือกจากเจ้าของกระทู้
ความคิดเห็นที่ 1
parameter แรก ผิด...ที่ถูกต้องเป็น date
*****************************************
formatDate(date, timeZone, format)
*****************************************
เช่น Utilities.formatDate(new Date(), "GMT+1", "MM/dd/yyyy")
https://developers.google.com/apps-script/reference/utilities/utilities#formatdatedate,-timezone,-format
วิธีสร้าง Date object จาก String
https://stackoverflow.com/a/62202821
*****************************************
formatDate(date, timeZone, format)
*****************************************
เช่น Utilities.formatDate(new Date(), "GMT+1", "MM/dd/yyyy")
https://developers.google.com/apps-script/reference/utilities/utilities#formatdatedate,-timezone,-format
วิธีสร้าง Date object จาก String
https://stackoverflow.com/a/62202821
▼ กำลังโหลดข้อมูล... ▼
แสดงความคิดเห็น
คุณสามารถแสดงความคิดเห็นกับกระทู้นี้ได้ด้วยการเข้าสู่ระบบ
กระทู้ที่คุณอาจสนใจ
อ่านกระทู้อื่นที่พูดคุยเกี่ยวกับ
การพัฒนา Web Application
JavaScript
Google
Google Forms
การพัฒนาซอฟต์แวร์
แปลงค่าวันที่จาก google form เป็นวันที่ไทยอย่างไรครับ
จากนั้นเขียน google script รับค่าวันที่ที่ได้จาก google form มาเก็บไว้ในตัวแปร อยากทำให้เป็นวันที่ไทยเช่น 16 พฤศจิกายน 2564 ไม่ทราบว่าต้องทำอย่างไรครับ ลองทำดูแล้วก็ไม่ได้
ค่าที่ได้จากการ log ดูคือ 2021-11-16 แต่พอแปลงแล้วก็ติด error ครับ