save date from input into db