vb中计算天数代码遇到问题
Private sub Form_Load()Dim str As String
str = txtindate.Text
lblDays.Caption = DateDiff("d", CDate(Format(str, "YYYY-MM-DD")), CDate(Format(Date, "YYYY-MM-DD")))
End sub
运行到这句lblDays.Caption = DateDiff("d", CDate(Format(str, "YYYY-MM-DD")), CDate(Format(Date, "YYYY-MM-DD")))
老是说实时错误'13',类型不匹配