save date to db