标签:double == util XML 成功 log cep har system
if (dr.Table.Columns[j].DataType.ToString() == "System.DateTime") { if (dr[dr.Table.Columns[j].ColumnName.ToString()] != DBNull.Value) { result += AddDoubleYH(Convert.ToDateTime(dr[dr.Table.Columns[j].ColumnName.ToString()]).ToString("yyyy-MM-dd HH:mm:ss")); //result += JsonConvert.SerializeObject(dr[dr.Table.Columns[j].ColumnName.ToString()]); } }
result_memo":"RuntimeException: com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of java.util.Date from String value ‘2017-07-19 08:08:08‘: not a valid representation (error: Failed to parse Date value ‘2017-07-19 08:08:08‘: Can not parse date \"2017-07-19 08:08:08\": not compatible with any of standard forms (\"yyyy-MM-dd‘T‘HH:mm:ss.SSSZ\", \"yyyy-MM-dd‘T‘HH:mm:ss.SSS‘Z‘\", \"EEE, dd MMM yyyy HH:mm:ss zzz\", \"yyyy-MM-dd\"))
解决方法:
C#端使用下面的代码时,java可以成功交易,但是接收到日期时间数据与C#端相差8个小时
result += JsonConvert.SerializeObject(dr[dr.Table.Columns[j].ColumnName.ToString()]);
随后,java端做了修改调整,使用tostring("")做的交易
标签:double == util XML 成功 log cep har system
原文地址:http://www.cnblogs.com/songyulan/p/7211027.html