def extract_datestring (gcal_event):
    """ Given a google calendar event dictionary, 
        grab either the datetime string or the date string.
    """
    #print("gcal_event: {}".format(gcal_event))

    try:

        if 'dateTime' in gcal_event['start']:
            retval = gcal_event['start']['dateTime']
        elif 'date' in gcal_event['start']:
            retval = gcal_event['start']['date']
        else:
            # This should never happen. Maybe an exception is wrong?
            print("Uh oh. extract_datestring could not find a date.")
            retval = None

    except:
        raise Exception("bad extract_datestring: "
                        "gcal_event = '{}'".format(
                           gcal_event))




    return retval