如何解决日期问题, 各位帮帮手,特急!!!
提示,前面有打开数据库。helpok
dbshelpok为全局变量。
modifiedate 为数据库里的日期字段。
Label1 = "今天是:" & Month(Date) & "月" & Day(Date) & "日"
Dim strsqlinfo As String
Dim rstCategories As Recordset
Dim num12 As Integer
strsqlinfo = "select count(*) as num12 from infomation where datepart('d',modifiedate)=datepart('d',date())"
Set rstCategories = dbsHelpok.OpenRecordset(strsqlinfo, dbOpenDynaset, dbSeeChanges)
With rstCategories
Label2 = !num12
End With
上面的代码没错!!计算出来的结果是将当天的数量交给label2。
现在的问题是,我想将DATE()函数改为由用户自已输入日期。这时该用什么函数呢??
和格式怎样写。。。