def get_sb_date(date_type, sb_json):
    """Get start of end date of a project.

    Arguments:
        date_type -- (string) "start", "end", or "publication" will cause the
                     function to search for either the start, end, or
                     publication date, respectively, of the project.
        sb_json -- (json) A science base json representing a science base file
                   to be parsed and saved to the database.
    Returns:
        (string) A date string for either the start or end date of a project,
        or a sting that says there was none provided.

    """
    try:
        for i in sb_json["dates"]:
            if i['type'].lower() == date_type:
                return i["dateString"]
        return "No " + date_type + " date provided."
    except KeyError:
        return "No " + date_type + " date provided."