To express in Spanish within + [time] of + doing something we use this structure:
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 call 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)
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 »