Welcome Guest, Not a member yet? Register   Sign In
How to select the matching details from table mysql query equal to current date
#1

[eluser]oldrock[/eluser]
Hi..,


my question is how can i select the row in a particular given time span.

i.e if my date field is having the entry as 2010:10:27 10:30:00 then that row should be selected when the current time reaches 2010:10:27 10:00 and until the current time reaches the 2010:10:27 18:30:00 . like that. Any help on this would do a great benefits for me..

thanks in advance
#2

[eluser]n0xie[/eluser]
Do you mean like this?
Code:
SELECT * FROM `my_table` WHERE date BETWEEN ('2010-10-27 10:30:00') AND ('2010-10-27 18:30:00');




Theme © iAndrew 2016 - Forum software by © MyBB