SELECT
CAST(date AS DATE),
SUM(amt) AS totamt
FROM TableName
GROUP BY CAST(date AS DATE)
when I using simple query this is working fine but when binding the data through gridview this is not working and throws the error:
DataBinding:’System.Data.Common.DataRecordInternal’ does not contain a property with the name ‘ExpenseDate’.
You are not selecting
ExpenseDatefrom database and trying to bind that column into your gridview. You should edit your database query to selectExpenseDateand then bind that in front end or remove that binding from front end.