dimanche 19 avril 2015

How to get the closest dates in sqlite database to present date

I have an SQLite database with a table that holds a column full of dates. I need to get the date closest to the present date out of everything in that column, but I don't know how to build a query for this.


For example I have the following dates in the column



3/15/2015
3/31/2015
4/15/2015
4/30/2015
5/15/2015
5/30/2015


If the current date is 4/20/2015 I need it to get all rows that have the date.


EDIT


For clarification I need the only the upcoming dates not the past dates.



4/30/2015


Can anyone help?


Aucun commentaire:

Enregistrer un commentaire