String was not recognized as a valid DateTime.Couldn't store <12/15/2009> in pqh_Quotation_Date Column. Expected type is DateTime.
今天一直遇到這個問題!
有的電腦會!有的電腦不會
是因為程式裡面SQL的寫法和電腦本身的日期格式相衝而造成的原因
只要把語法改一下!問題就解決囉
原本
CONVERT(CHAR(10), IsNULL(pqh.pqh_Quotation_Date,''), 101) AS pqh_Quotation_Date
改成
CONVERT(Varchar(10), pqh.pqh_Quotation_Date, 111) As pqh_Quotation_Date
搞定!收工
分享使用微軟開發工具及工作上會遇到的疑難雜症
2009-12-16
String was not recognized as a valid DateTime.Couldn't store <12/15/2009> in pqh_Quotation_Date Column. Expected type is DateTime.
訂閱:
張貼留言 (Atom)
0 comments:
張貼留言