When I first get talking to a prospective client, a question I often get is "How long will it take to...?". I used to give estimations as to how long it may taken someone to lose weight a specific amount of weight, but I've found that to be almost completely pointless.
Each individual is different and what one person can achieve in 3 months may take someone else 6. Really and truly if you're serious about your goals, the time taken shouldn't really matter. Exercise isn't a momentary thing; there wont be one specific rep, set or gym session that gets you where you want to be. It's the compounding of continued effort week on week, month on month etc.
The key to maintaining that longevity resides entirely in how you perceive the process. If your motivation is extrinsic i.e I want a six-pack, then the process is nothing more than a means to an end. This can be a positive driving force for some, but it has many pitfalls.
Ultimately there is nothing more sustainable than being intrinsically motivated. There is little consideration for the length of the process, just a desire for the process to be perpetual, fun and character-forming.
If you are just starting out in the gym, be enthralled by the the journey you've just embarked upon. Try your best to be in it for the long haul, consistency will pay dividends.