setting date format to YYYY-MM-DD