以下是引用comnets在2013-8-12 16:59:00的发言:
哦。知道了。
我找到了获取服务器时间的代码
Dim cmd As New SQLCommand
Dim dt As
Date
cmd.ConnectionName =
"数据源名称"
cmd.CommandText = "Select
GetDate()"
dt = cmd.ExecuteScalar()
怎样判断dt的时间部分(不包括日期)和9:30的关系?
Dim cmd As New SQLCommand
Dim dt As Date
cmd.C
cmd.CommandText = "Select GetDate()"
dt = cmd.ExecuteScalar()
Dim d As New Date(dt.Year, dt.Month, dt.Day, 9, 30, 0)
if dt > d then
'消失
end if