from datetime import datetime


def yearmonth(value):
    """ Returns the input converted to a string in format YYYY-mm
    
    Args:
        value (datetime): date to convert
    
    Returns:
        output (str): formatted in YYYY-mm
    """
    output = datetime.strftime(value, '%Y-%m')
    return output