mysql - finding date and time of last 5 days -


i trying find out date , time of last 5 days database,the data inserted table in form of date("y-m-d h:i:s"); when try retrieving values not show until time table removed query :

 select  key,date_format(lastupdated, '%d %m %y')     table    lastupdated between now() - interval 5 day , now()  order key desc; 

i believe want compare date() of lastupdated

 select  key,date_format(lastupdated, '%d %m %y')     table    date(lastupdated) between now() - interval 5 day , now()  order key desc; 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -