proc to cast string to period (from_date and to_date)