Grammar basics

Past perfect continuous

Use the past perfect continuous for an action that was going on for some time before another action in the past.


Structure

SentenceStructureExample
PositiveSubject + had + been + V-ingI had been working for five hours when the server crashed.
NegativeSubject + had + not + been + V-ingShe hadn't been sleeping well.
QuestionHad + subject + been + V-ing?How long had you been waiting?

When to use

How long an action went on before something happened

I had been waiting for an hour when the bus finally came.

To explain a past result

The ground was wet. It had been raining all night.

Learn to understand it first

This tense is not very common in everyday speech. You'll see it more in books and stories. It's the present perfect continuous, but moved into the past: have been → had been.

Time words

These words often go with the past perfect continuous.

How long

phrase/haʊ lɔːŋ/ไทยนานแค่ไหน

Use it to ask about the length of time.

How long had you been living there before you moved?

For hours

phrase/fɔːr ˈaʊərz/ไทยเป็นชั่วโมง ๆ, หลายชั่วโมง

For a long time, for more than one hour.

I had been looking for the bug for hours before I found it.

All morning

phrase/ɔːl ˈmɔːrnɪŋ/ไทยทั้งเช้า

During the whole morning. You can also say all day and all night.

I was tired because I had been coding all morning.

Previous
Past perfect