Date: to json; save date to db.