i am try to systemdate and rem_date compare but error message is "Incorrect Syntax near'='"
Dim adp As New SqlDataAdapter("select * from reminder", obcon.con)
Dim dset As New DataSet
adp.Fill(dset)
datagridview1.DataSource = dset.Tables(0)
obcon.con.Open()
Dim cmd As New SqlCommand("select rem_id,rem_hour,rem_min from reminder rem_date=" & Date.Now.Date.ToString & "", obcon.con)
MsgBox("select rem_id,rem_hour,rem_min from reminder rem_date=" & Date.Now.Date.ToString & "")
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.RecordsAffected <> 0 Then
While dr.Read()
Dim s As String = dr.GetValue(1).ToString().Trim() & ":" & dr.GetValue(2).ToString().Trim()
Dim cs As String = Date.Now.Hour.ToString().Trim() & ":" & Date.Now.Minute.ToString().Trim()
' MsgBox(s & " (((( " & cs)
If s = cs Then
'MsgBox(dr.GetValue(1) & ":" & dr.GetValue(2) & Date.Now.Hour.ToString() & Date.Now.Minute.ToString())
MsgBox("Reminder")
End If
in database rem_date stored in for example 29-02-2012 00:00:00 formate.