fit the date to database field