mercredi 14 octobre 2015

Sqlite Convert Date Format from dd/mm/yyyy to yyyy-mm-dd

Im using a SQLite database in my application. I've imported a lot of records to do some testing with my db and generate queries with data I have. One issue I have encountered is with dates for a particular table. SQLite doesn't have a date type, so Im using text and decided to store the data in my app in the following format dd/mm/yyyy. Although thats exactly what I want to see, I've read it is a nightmare to query against a range of dates if I use this format.

As I've imported the data and learning sql, are there any sqlite queries I can use to change the existing data date format from dd/mm/yyyy to yyyy-mm-dd without me having to export it back into excel and manipulate it the way I want and then reimport back in my db?

Thanks

Aucun commentaire:

Enregistrer un commentaire