combine dateVal var creation and assigning to one line