Dim d1 As Datetime =Date.now.adddays(-20)
messagebox.show(d1)
DataTables("日志记录").DeleteFor("[时间] < # d1# ")
代码调试时错误信息如下,但是不知道怎么改了,请大侠指点!
---------------------------
版本:2012.11.29.1
---------------------------
代码执行出错,错误信息:
System.FormatException: 该字符串未被识别为有效的 DateTime。有一个从索引 1 处开始的未知字。
在 System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
在 System.Data.ConstNode..ctor(DataTable table, ValueType type, Object constant, Boolean fParseQuotes)
在 System.Data.ExpressionParser.Parse()
在 System.Data.DataExpression..ctor(DataTable table, String expression, Type type)
在 System.Data.Select..ctor(DataTable table, String filterExpression, String sort, DataViewRowState recordStates)
在 System.Data.DataTable.Select(String filterExpression, String sort, DataViewRowState recordStates)
在 Foxtable.DataTable.Select(String O100O01lO01O0O11, String O100, DataViewRowState O1OlO010)
在 Foxtable.DataTable.DeleteFor(String O0l10l)
在 UserCode.Test()
---------------------------
确定
---------------------------