" i have been having trouble sleeping for the past three weeks"
"I had trouble sleeping for three weeks"
"I havent slept in three weeks"
"Over the past three weeks, i have had trouble sleeping"
A few examples to help with the difference between in, for, and over