Interesting question. At first when I read it I was thinking "IT ALL DEPENDS" but then you wrote about learning a piece you like, much more quickly...
1st of all, it really all depends on the difficulty of the piece
2nd - your experience level. Do you just have to learn the notes? Or do you have to develop special technique you do not have as of yet.
3rd - I'm not going to get technical with you. "Playable" I get it
good enough so you, yourself can enjoy the music, and your friends who don't know any better will still think you are some sort of Jedi on the piano hahaha
4th - It could take you 2 years to learn a simple chopin nocturne if you only practiced 2 minutes per day right? So how many days, or months should really be asked - how many hours of practice?
5th - to slightly negate the above. I find it that when practicing something then "sleeping on it", the next morning, that's when things improve. I don't know if I'm working things out in my sleep or what, but I'm certain other's are noticing this as well.
Ever just totally get inspired by a piece? I've always known of Chopin Nocturne Op.9 No.1 heard it many many times. Never played it.
About 2 weeks ago I work up with it playing in my ear. I was like "I gotta play this!!!". I devoured it in 2 days - 4 hours total. Start to finish, memorized.
Give me a Scriabin etude? Pay me $10,000 to learn it, probably will take me a few years, IF I ever finish it
Playing something that inspires you is important.
A concert pianist must play what is required. And they must play it as if they "feel" something. Maybe they do. If a piece does not make me "feel" anything, I won't play it. Benefits of being a hobbyist
Sorry I cannot give you an exact figure as to how long something should take to learn. My suggestion is to practice at night right before you go to sleep. I have a suspicion that alot of "learning" happens in your sleep.