Sql query of dates

0

I have to make a Sql query and only should show what from now on what is with a previous date can not be displayed.

I have the problem that if I put it with DATETIME format it takes me the minutes and when I do the select what I just inserted it will not show me after 1 minute ....

If I put it in String format I can not make the between between dates .........

Select descripcion from table_eventos where tiempo > sysdate()

I BELIEVE that the selection would be like this ...

In the insert I get 2017/11/05 21:06:06 How to do it so that it only takes the year / month / day?

    
asked by EduBw 05.11.2017 в 21:07
source

1 answer

1

Instead of sysdate() , you can use curdate() that only returns the current date without the hours and minutes. The query would be:

Select descripcion
from table_eventos
where tiempo >= curdate()
    
answered by 05.11.2017 / 21:14
source