Im currently working with application, where it will automatically inform the user that there is an overdue account today.
i decided to compare the current date(today) to stored date in mysql database, heres my code:
Public Sub getReminder() Dim _con1 As New MySqlConnection Dim _cmd1 As New MySqlCommand Dim dr As MySqlDataReader Dim date1 As String With _con1 .ConnectionString = "server=xxx.xxx.x.x;uid=xxx;pwd=xxx;database=daspatch" If _con1.State = ConnectionState.Closed Then _con1.Open() End If End With 'date1 = Convert.ToDateTime(Today) _cmd1 = New MySqlCommand("SELECT date_due FROM billing_tbl", _con1) date1 = Date.Today dr = _cmd1.ExecuteReader() If dr.HasRows Then MsgBox("You have account already due") Else MsgBox("You dont have account due today") End If End Sub
error: date cannot convert to boolean()
i know i missed something here.