In order to indicate the duration of an action, use llevar + tiempo:
Llevo 3 años en Madrid = I have been in Madrid for 3 years, and I´m in Madrid now
Mi madre lleva una semana en el hospital = My mother has been in the hospital for a week (and she´s in the hospital now)
Llevamos un mes con lluvias y frío = It has been raining for a month and it´s been cold
You also should translate How long using llevar:
¿Cuánto tiempo llevas en España? – How long have you been in Spain?
¿Cuánto tiempo llevas con el español? – How long have you been studying Spanish?
¡Ojo! We use this construction ONLY for non-ended actions.