Let\'s say I have following data:
Time Status 10:00 On 11:00 Off 12:00 Off 13:00 Off 14:00 Off<
It can be done as.
TakeWhile
Hope it helps..