Dim cmd As New SQLCommand Dim dt As Datecmd.ConnectionName = "数据源名称"cmd.CommandText = "Select GetDate()"dt = cmd.ExecuteScalar()dt = dt.Date