-- 下面这段代码有啥问题?
Dim time_type As String=args(0) \' 把类型做为入参,即是取时间还是取日期
Dim cmd As New SQLCommand
Dim dt As Date
cmd.C
cmd.CommandText = "Select GetDate()"
dt = cmd.ExecuteScalar()
If time_type="time" Then \'如果入参类型是Date,则返回日期,否则,返回时间
dt = dt.Date
End
Return dt
想定义一个函数,红色的这部分老是报错,屏蔽了就正常了,这是啥问题呀?