Returns yyyymmdd in with optional separator between date units if string looks like a date.

get_yyyymmdd_from_possible_dates(dates, sep = "-")

Arguments

dates

character vector with possible dates

sep

character string to be used to separate date units.