def date_time_to_string(d):
    """Converts a datetime to "Apr 7, 2014 2:51PM" format,
    removing leading zeroes from the day and hour"""
    day = d.strftime('%d').lstrip('0')
    month = d.strftime('%b')
    year = d.strftime('%Y')
    full_date = '%s %s, %s' % (month, day, year)
    full_time = d.strftime('%I:%M%p').lstrip('0')
    return '%s %s' % (full_date, full_time)
