Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How do I search between two dates from two cells in a table by a mask in form?

Please help me with sample code.
Posted
Updated 29-Apr-10 2:48am
v2

If you want to show data only between two dates, run a SQL query on your data source that specifies the date range and the column to check against. If that's not what you mean, try to make your question clearer. We can clean up your spelling for you, that's not a problem. But, you need to make clear what it is you want to know, what you've tried, etc.
 
Share this answer
 
You need to use WHERE EndDate < @EndDate AND StartDate > @StartDate in your query where @EndDate and @StartDate are parameters created tlike this cmdSelect.Parameters.AddWithValue("@EndDate",dteEnd)
 
Share this answer
 
v2
hi
ok
i have table in my program in that table two field of date(start_date,end,date)
for serch betwin two date i use from mask on the form but unfortunately
dont answered may be prblem in syntax
******************************************************
dim sql as string=nothing
sql = "select * from table where" &amp;mask.text &amp; "betwin start_date and end_date"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900