jeudi 9 juillet 2015

Comparing 2 RFC 1123 dateTime in SQL and Java

I have Date and Time stored in RFC1123 format in my database(as varchar). e.g "2015-07-09T08:24:50.834Z". What I want is to fetch records from database after a particular timestamp, with that particular timestamp as userinput in same RFC1123 format String, by executing query like Select * from foo where time > 2015-06-09T01:13:40.834Z;

What would be the best way to do? I guess I would need to save timestamp in database as datetime field instead of varchar but perhaps SQLite doesn't accept this format "2015-07-09T08:24:50.834Z"

Aucun commentaire:

Enregistrer un commentaire