Hi I am using a list view to view the data between two selected dates i have two ways:

1.

"select * from mytable where mydate between '" + fromdate + "' and '" + todate + "'";

2.

"select * from mytable where mydate >= '" + fromdate + "' and mydate<= '" + todate + "'";

but the problem is if i select the same date as fromdate and todate in which there exist records in table that does not show!
Any help please in simple way
thanks

both of your query should have to work. I have checked it on myend also...
Just make sure you have data in database...

See below query :

select * from leavetrans where 
start_date >= '08/02/2010' and start_date <= '08/02/2010' 
--start_date between '08/02/2010' and '08/02/2010'

Hi I am using a list view to view the data between two selected dates i have two ways:

1.

"select * from mytable where mydate between '" + fromdate + "' and '" + todate + "'";

2.

"select * from mytable where mydate >= '" + fromdate + "' and mydate<= '" + todate + "'";

but the problem is if i select the same date as fromdate and todate in which there exist records in table that does not show!
Any help please in simple way
thanks

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.