Comparing dates stored as string using Datetime

I have stored the date date as String

in my database in the following format:

 dateFormater = new SimpleDateFormat("dd MMM yyyy");

      

Now I need to access data between two dates startWeekDate

and endWeekDate

, formatted as above. Currently my request: where clause

at_date BETWEEN Datetime( '"+startWeekDate+"') AND Datetime( '"+endWeekDate+"')

      

Where startWeekDate '10 Aug 2014'

is and endWeekDate is '16 Aug 2014'

. But I am getting null result on mine TextView

. Can anyone guide me how can I do this.

+3


source to share


1 answer


It is not one of the supported date formats .



Just use yyyy-MM-dd

.

+1


source







All Articles