Saying how long you have done something is pretty simple in Chinese. Saying how long you have not done something is just as easy.
Structure
Expressing how long something has not been done is slightly different to expressing the duration of an action.
subject+duration+没+verb+object+了
So now the duration comes right after the subject and 了 is at the end of the sentence. The verb has to be negated with 没, as the action hasn't happened.
Examples
Tā men liǎnɡ tiān méi chī fàn le.
他们 两天 没 吃饭 了。
他们 两天 没 吃饭 了。
They haven't eaten for two days.