Just a Ordinary Programmer
ปวดหัวนักกับ Datetime, Culture UI พ.ศ. หรือ ค.ศ. ล่ะ
เคยไหม?
ใช้พวก Calendar แล้ว .SelectedDate เป็น 2010
แล้วใน Database เป็น 2553
เวลา Query มาก้ Error Minimum Date บ้าง อะไรบ้าง
ใครยังใช้วิธีการแก้ปัญหาด้วยการ .AddYears(543) อยู่บ้าง
แล้วถ้าวันนึงมีคนไปแก้ Religions บน Server ล่ะจะทำไง
วันนี้พบวิธีละ
พอดีว่า ตัว Control ที่ผมใช้ jQueryDatePicker มันสนับสนุนแต่ปี ค.ศ. พอส่งไป Query ก็ Exception Thrown มาในบัดดล
วิธีแก้
ระดับ Page (แก้เฉพาะ Page นั้น ๆ)
<%@ Page UICulture="en" Culture="en-US" %>
แก้ที่ WebConfig (มีผลกับทุก page)
<globalization uiCulture="en" culture="en-US" />ชะงัดนักแล…
| Print article | This entry was posted by Krucode on March 8, 2010 at 6:50 pm, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 6 months ago
เพิ่งรู้นะเนี้ย ปกติไป set culture ใน coding
เมพขิงๆ