Put 什么时候 before the verb: 你什么时候走? With 都 or 也 it means 'any time': 什么时候都行. As a retort, 我什么时候说过? means 'When did I ever say that?', that is, 'I never did.'
register
何时 is the formal, written equivalent, and 几时 is literary or dialectal. In everyday Mandarin people say 什么时候.