Ultimatums?

Has anyone given their bf an ultimatum, like about getting married? My SO is on and off about marriage, sometimes he says he doesn't believe in it and sometimes he says he will get married. We've been together three years and I'll be 24 in two years. Would it be silly to tell him that I want to be engaged by 24 if we're still together? If anyone has done this, did it work in your favor or did it push him away?