Didn't take me long; I learned it on just one trip actually.
I had only been riding for a few months on the weekends before I decided I should do a 100 mile ride, which started in Lubbock, TX and went due north to Plainview, then back again. On the way there I couldn't hear the wind in my ears, I was moving along a pretty good clip, and I thought, "man, this is easy. I'm in a lot better shape than I thought I was." I was feeling pretty good about myself until I turned around and realized, that, no, I'm actually not the stud cyclist I had started to think I was. The rest of the ride was straight into a headwind, and it was a long, slow, defeating slog home.
Happened to me again just recently on a 100k, but this time I knew it was coming...not sure if that's better or worse though.