Answer the question
In order to leave comments, you need to log in
How to add date to dataGridView?
Let the table have a certain date for each record, you need to display the records that are in the interval of given dates.
Can someone tell me how to do it? An example is desirable so that it is clear without questions
PS the table is not organized by sql
Answer the question
In order to leave comments, you need to log in
There are several ways to do this, but I would recommend that you bind a BindingSource and use the Filter property.
testBindingSource.Filter =
$"DateTimeColumn >= #{DateTime.Now.AddMonths(-1):MM/dd/yyyy}# AND DateTimeColumn <= #{DateTime.Now:MM/dd/yyyy}#";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question