我在以下代码中收到输入字符串格式错误...在调试代码时,它作为单行代码运行,因此我无法深入研究可能导致格式异常的原因...可以请指出我做错了什么..谢谢。
例外:
FormatException was unhandled by user code:
"Input string was not in correct format"
代码:
store.DatabaseCommands.UpdateByIndex("Movies/NewIndexName",
new IndexQuery
{
Query =
string.Format("Status:Released AND IsDeleted:false AND ReleaseDate:{* TO {0}}",
DateTools.DateToString(new DateTime(2012, 4, 3),
DateTools.Resolution.MILLISECOND))
},
new[]
{
new PatchRequest
{
Type = PatchCommandType.Modify,
Name = "Status",
Value = "TestingReleased"
}
}, allowStale: false);