def format_datestamp(datestamp):
    """Format datestamp to an OAI-PMH compliant format.

    Parameters
    ----------
    datestamp: datetime.datetime
        A datestamp.

    Return
    ------
    str:
        Formatted datestamp.
    """
    return datestamp.strftime('%Y-%m-%dT%H:%M:%SZ')