Now writes to sqlite database

Dates don't format correctly