anyone please explain to me what is the diffrence of this two query

select * from tbl_Booking where [Date of Pres] between 'October 11,2012' and 'September 17,2012'
(this query can display the information)

select * from tbl_booking where [Date of Pres] between 'September 17,2012' and 'October 11,2012'
(while this query display nothing)

Im trying to retrive the information on the table where the date should be in this order september 17,2012 to october 11,2012. when I use the 2nd query it didnt display any information at all, but they have the same date inside the table. And when I use the 1st query it display the data that i need from the table. Why is it that the 1st query display all the info on the table but the 2nd query doesnt display anything at all?

How are you passing in the date values? Are you using the text that you have given? or DDMMYYYY or MMDDYYYY or some other format? Can you put your actual SQL query down it should only logically return data for the second query as September is before October.

Be a part of the DaniWeb community

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