Why convert each date with a select if they are putting it into the db anyway? Why not just let sqlite do the conversion as part of the insert statement?
But you are right. In production, it makes more sense to let SQLite handle the conversion and insertion in the same statement.