Wednesday, August 11, 2010

How do i filter the current month in a database and display them in a datagrid in vb.net?

im cunducting a monthly report and i want to display the data of a spacific month on a datagridHow do i filter the current month in a database and display them in a datagrid in vb.net?
Just write a query to retrive data to the grid.


Eg:


select * from Mytable where month(MyDate) = month(systemdate)





So pass the system date to the query and the query will generate records for the selected month. You can display selected record on the grid.





Happy Programmin.

No comments:

Post a Comment