In recent years, I've prolonged the main game for as long as possible. It usually takes 100-200 hours before I beat the E4, as I tend to get sidetracked breeding, training up teams, etc. before I beat the main game. I think the longest time to first round E4 completion was 323 hours for LeafGreen.
In terms of days/weeks/months, Diamond was one of the fastest, and I think that was three months or so (I got really caught up in online trading to the point that I didn't finish the rest of the game for a while, though). Red might have been faster, but I don't remember. Gold took about five months, but I actually got stuck on puzzles back then. X might have been faster, but I don't remember (I would have to check the dates of when I caught the legendaries and such). Some games have taken years, but that's mainly because I intentionally avoid beating them because historically, I haven't liked the feeling of things being over. (That applies to other games too, though; I finally got all 120 stars in Super Mario 64 a couple of weeks ago, after owning the game for over twenty years.)
Challenge runs tend to be a lot faster, probably more along the lines of 20-30 hours over a month or two. Occasionally I'll blast through them in a few days, but lately, these mostly consist of playing older games on my 3DS to help me fall asleep, so I don't put in that much time per day.
I'm debating speeding things up this time, though. It occurred to me that I have less time for gaming than I did as a kid, and more disposable income for buying games, so there's no reason to force myself to avoid beating a gym leader because I already beat one this week and I need to make the game last longer. But it's been years since I just blasted through the game, and I'm not sure if I'll be able to adjust back or not.