I'm using Stata 14 with Windows 10 OS
I need to calculate the duration that participants stay in a lecture. I have the following data:
I need to calculate the duration that participants stay in a lecture. I have the following data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str36 id str10 date str7 time str12 action "036d9c59-52cf-4c4a-a2e0-29609931129c" " 5/12/2020" "7:00:42" " Joined" "036d9c59-52cf-4c4a-a2e0-29609931129c" " 5/12/2020" "7:01:37" " Left" "03b1ffbc-9100-4cbe-b5e1-420151c2227b" " 5/12/2020" "8:07:58" " Joined" "03b1ffbc-9100-4cbe-b5e1-420151c2227b" " 5/12/2020" "9:28:38" " Left" "03b2c990-7ac6-4553-8a37-8bdc351d1d9a" " 5/12/2020" "8:48:09" " Joined" "03b2c990-7ac6-4553-8a37-8bdc351d1d9a" " 5/12/2020" "8:48:21" " Left" "04304bac-3789-45a6-8b3c-b843177324be" " 5/12/2020" "8:48:27" " Joined" "04304bac-3789-45a6-8b3c-b843177324be" " 5/12/2020" "9:34:07" " Left" "05291aa4-5719-4413-8558-5c385f4b5106" " 5/12/2020" "8:01:47" " Joined" "05291aa4-5719-4413-8558-5c385f4b5106" " 5/12/2020" "8:02:35" " Left" "056f8ad8-a5c9-4af8-aeae-432486d23d0b" " 5/12/2020" "8:00:40" " Joined" "056f8ad8-a5c9-4af8-aeae-432486d23d0b" " 5/12/2020" "8:12:53" " Left" end
Comment