from datetime import datetime


def convert_date(raw_date: str):
    """
    Convert raw date field into a value interpretable by the dataserver.
    """
    # The date is inconsistently listed in dd/mm/YYYY format or in d/m/yy
    # we pad the latter to make it look the same and be parseable.
    day, month, year = raw_date.split("/")
    day = day.zfill(2)
    month = month.zfill(2)
    formatYear = "%Y"
    if len(year) == 2:
        formatYear = "%y"
    date = datetime.strptime(raw_date, f"%d/%m/{formatYear}")
    return date.strftime("%m/%d/%YZ")