I`ve got a DateTimePicker DtpDate
I`ve got an access database with a table
tblExpenses.Date format format is DateTime (i.e : dd.mm.yyyy (11.01.2003))
I want to select sum(Amount) from tblExpenses where tblexpenses.date = dtpDate.value
What am I missing?
give me a code example if possible
Code:
dtpDate.CustomFormat = "dd.MM.yyyy"
I`ve got an access database with a table
Code:
table tblExpenses(amount, Date)
I want to select sum(Amount) from tblExpenses where tblexpenses.date = dtpDate.value
Code:
Dim Date As String = dtpDate.Value.Month
Dim Expences As String = cboUtgift.Text
adExpences= New OleDb.OleDbDataAdapter("SELECT Sum(tblExpences.Amount) AS Totals from tblExpences where " & Date & " = Month(tblExpences.Date) ", Me.OleDbConnection)
adExpences.Fill(dsExpences, "dtExpences")
Me.OleDbConnection.Close()
What am I missing?
give me a code example if possible