from datetime import datetime


def parse_date_in_str(_str, datenum):
    """ Parse the formatters like %Y%m%d in str into the given date. """
    dn = datetime.strptime(str(datenum), "%Y%m%d")
    return dn.strftime(_str)