sql server strQuery = "select * from SaleProductPlan where CONVERT(varchar(100), 日期, 23) <> '1900-01-01'"********************* access strQuery = "select * from SaleProductPlan where Format(日期,'yyyy-mm-dd') <> '1900-01-01'"
"select * from SaleProductPlan where Format(日期,'yyyy-mm-dd') <> '1900-01-01'"
不需要统一日期格式,直接比较就可以了吧 "select * from SaleProductPlan where 日期 <> '1900-01-01'"
"Select * From SaleProductPlan Where 日期 > '1900-01-01'"
曾经在下面的语句中碰到类似的问题, strdate="2010-07-31" strQuery = "Select 日期 from SaleProductNo where 类别='" & strStyle + "'" & _ "and 规格='" & strSize + "'" OpenRes Rs, strQuery If Not Rs.EOF Then
'If Format(s.Fields(0< strDate Then (该语句对于表中的日期格式 2010-7-15<strdate就失效) If Format(Rs.Fields(0), "yyyy-mm-dd") < strDate Then endif
曾经在下面的语句中碰到类似的问题, strdate="2010-07-31" strQuery = "Select 日期 from SaleProductNo where 类别='" & strStyle + "'" & _ "and 规格='" & strSize + "'" OpenRes Rs, strQuery If Not Rs.EOF Then '对上面的回复中的语句改正如下 'If rs.Fields(0)< strDate Then (该语句对于表中的日期格式 2010-7-15<strdate就失效) If Format(Rs.Fields(0), "yyyy-mm-dd") < strDate Then endif
strQuery = "select * from SaleProductPlan where CONVERT(varchar(100), 日期, 23) <> '1900-01-01'"*********************
access
strQuery = "select * from SaleProductPlan where Format(日期,'yyyy-mm-dd') <> '1900-01-01'"
"select * from SaleProductPlan where 日期 <> '1900-01-01'"
strdate="2010-07-31"
strQuery = "Select 日期 from SaleProductNo where 类别='" & strStyle + "'" & _
"and 规格='" & strSize + "'"
OpenRes Rs, strQuery
If Not Rs.EOF Then
'If Format(s.Fields(0< strDate Then (该语句对于表中的日期格式 2010-7-15<strdate就失效) If Format(Rs.Fields(0), "yyyy-mm-dd") < strDate Then
endif
曾经在下面的语句中碰到类似的问题,
strdate="2010-07-31"
strQuery = "Select 日期 from SaleProductNo where 类别='" & strStyle + "'" & _
"and 规格='" & strSize + "'"
OpenRes Rs, strQuery
If Not Rs.EOF Then
'对上面的回复中的语句改正如下
'If rs.Fields(0)< strDate Then (该语句对于表中的日期格式 2010-7-15<strdate就失效) If Format(Rs.Fields(0), "yyyy-mm-dd") < strDate Then
endif