insert date to db instead of string of date