To express for how long you do/did/will do something in Spanish you do not need to use any prepositions.
Here are some examples:
Voy a estar en Tenerife unos días.I am going to be in Tenerife for a few days.
Voy a estar en Nueva York dos semanas.I am going to be in New York for two weeks.
However, the prepositions "durante" and "por" can also be used:
No puede hablar durante 2 días.He can't talk for 2 days.
Debo tomar estos antibióticos por siete días.I must take these antibiotics for seven days.
Bear in mind that durante is more frequently used than por.
Want to make sure your Spanish sounds confident?
We’ll map your knowledge and give you free lessons to focus on your
gaps and mistakes. Start your Braimap today »