I have a database table with a DATETIME column. What I want to do is to identify whether the date part of a record is the same of with the date part of today. However, I have a datatable object and I cannot use daUsage.Select with the SQL function DATEPART.
So what I’m asking is whether there is a way to filter results from a datatable without using the select function. If this is possible how is it done? I could use LINQ but I’m pretty new to it and I feel that there must be a better way to do that.
Thanks
You could use DataTable.Select to check if your date is between 0 o’clock this day 0 o’clock next day:
On this way you get only records of today.
In LINQ you could compare DateTime.Date with
DateTime.Today: