A + [time] + de + infinitive for within + [time] of + gerund in Spanish

There's a structure that is commonly used in Spanish to express: within time of doing something.

How do we say in Spanish within time of doing something?

The following structure is used in Spanish to express within time of doing something:

A + [time] + de + infinitive

Here are some examples:

A las dos horas de cancelar nuestro vuelo nos ofrecieron otro.Within two hours of cancelling our flight they offered us another one.

A los 5 minutos de llegar a casa mi hija me llamó para que la recogiera.Within 5 minutes of arriving home my daughter called me [and asked me] to pick her up.

A la semana de empezar el trabajo lo despidieron.Within a week of starting the job he was fired.

Al minuto de comenzar la reunión los jefes fueron interrumpidos por la secretaria.Within a minute of starting the meeting the bosses were interrupted by the secretary.

Note that in Spanish the definite articles are used (el, la, los, las), while  English either uses no article or the indefinite article (see the third example above "within a week/a la semana").

Also, if the time phrase is masculine singular, using "el", then "a" "el" are contracted: "al" as usual (see last example above) 

See also A tan solo + [length of time] + de for just [some time] before

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 »

Learn more about these related Spanish grammar topics

Examples and resources

Al minuto de comenzar la reunión los jefes fueron interrumpidos por la secretaria.Within a minute of starting the meeting the bosses were interrupted by the secretary.
A los 5 minutos de llegar a casa mi hija me llamó para que la recogiera.Within 5 minutes of arriving home my daughter called me [and asked me] to pick her up.
A las dos horas de cancelar nuestro vuelo nos ofrecieron otro.Within two hours of cancelling our flight they offered us another one.
A la semana de empezar el trabajo lo despidieron.Within a week of starting the job he was fired.
Clever stuff happening!