ASP+ACCESS 数据库中日期的调用
DimEndDateEndDate="2012-12-31"SetRs=Gb.Execute("SELECTProductName,UseMoney,AddDateFRO...
Dim EndDate
EndDate="2012-12-31"
Set Rs=Gb.Execute("SELECT ProductName,UseMoney,AddDate FROM [Gb_MyProduct] WHERE DateDiff('d',AddDate,"& CDate(EndDate) &")<0 ORDER BY MyProductID ASC")
If Rs("AddDate")<=CDate(EndDate) Then
Response.Write DateDiff("d",Rs("AddDate"),CDate(EndDate))
End If
数据值是“2012-12-27”,居然能显示出来4?这是怎么回事?ASP和ACCESS相矛盾啊 展开
EndDate="2012-12-31"
Set Rs=Gb.Execute("SELECT ProductName,UseMoney,AddDate FROM [Gb_MyProduct] WHERE DateDiff('d',AddDate,"& CDate(EndDate) &")<0 ORDER BY MyProductID ASC")
If Rs("AddDate")<=CDate(EndDate) Then
Response.Write DateDiff("d",Rs("AddDate"),CDate(EndDate))
End If
数据值是“2012-12-27”,居然能显示出来4?这是怎么回事?ASP和ACCESS相矛盾啊 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询