mercredi 18 février 2015

Compaire sqlite database date string "yyyy-MM-dd" with todays string in android?

I am storing from_date and to_date column in the database as sdf (yyyy-MM-DD). And I want to check if todays date is between these two dates or not.


My query is: String where = Alarm.COL_TIME+" = "+"'"+time+"' AND Date(from_date) <= Date ('"+ today +"') AND Date(to_date) >= Date ('"+ today +"')";


But it shows nothing. Please neglect time


how to do this??


Aucun commentaire:

Enregistrer un commentaire