refact date in team dao and histoyr dao