parse dates from string format