I put 2 dtpicker in my project. both are for search data from backed access file. like (1st dtpicker) i select a date 16/08/08 and (2nd dtpicker) 16/09/08. i want to find data last a month or any few days. i mean i want to find a period data like a month or a week or other. what code i will write for it. please help me

using between or operator ">" and "<".

commented: Right... +1

actually i don't know any more about dtpicker. so please details.

>> actually i don't know any more about dtpicker. so please details.
its not about dtpicker but query with sql syntax.

>> both are for search data from backed access file. like (1st dtpicker) i select a date 16/08/08 and (2nd dtpicker) 16/09/08. i want to find data last a month or any few days.
you want to search data between 1st dtpicker and 2nd dtpicker. so use an operator i gave to you in sql query syntax.

You are right.
I think it is like..... SELECT Date FROM participants WHERE Date between 10/08/08 and 10/09/08.
But when i select a date from dtpicker how can i put it in this syntax. I mean date is depend on my choice. it will be change many time.

SELECT * FROM participants WHERE Date between DTPicker1.Value and DTPicker2.Value

commented: thanks a lot. +1
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.