I have a table with in ms access with fields like .
LoginID, UserID , CheckInTime
101 , 122 ,10/27/2014 4:32:27 AM

iwant to filter the data in my vb.net form by date . what query i need so that i can filter the data by date?
so that when i select the datetimepicker the query only show me the data of selected date.

Recommended Answers

All 2 Replies

In your sql query, you will use a where clause to match the date. The question is how much of the date do you want to match? the month, day, month + day, including the exact time?

More info on DateTimePicker

If you want to find records for the same "month/day/year", what you can do is that when the selection is made and the event triggers, get the value in the format that you want, then use that value in your SQL query so you only match the relevant records.

You havent provided and sample code so its hard to give more specific guidance.

in table, DateTime format is 10/27/2014 4:32:27 AM and i want to extract data through date only not time .
like select * from tb_attendance where date='" & txt1.text & "'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.