You may fool all the people some of the time; you can even fool some of the people all the time; but you can't fool all of the people all the time.
Also attributed to Phineas barnum
Alexander K. McClure Lincoln's Yarns and Stories (1904). See also One can fool some men, or...