Hi all,
I'm trying to create a new binary variable that has a '1' if the date and time for the observation in 'Stage 1' is after the date and time in MessageTime (and a '0' if it isn't). I'm having difficulties reformatting the time and date in MessageTime to be the same as that for Stage1 - and I'm not too clear on how to create a binary premised on the above relationship between two times and dates. Any help would be very much appreciated.
Thank you!
---
Dataex export below:
I'm trying to create a new binary variable that has a '1' if the date and time for the observation in 'Stage 1' is after the date and time in MessageTime (and a '0' if it isn't). I'm having difficulties reformatting the time and date in MessageTime to be the same as that for Stage1 - and I'm not too clear on how to create a binary premised on the above relationship between two times and dates. Any help would be very much appreciated.
Thank you!
---
Dataex export below:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int newid double Stage1 str16 MessageTime 614 . "06-10-2018 11:27" 388 1848413205000.0002 "06-10-2018 15:32" 1639 1849260197000 "06-10-2018 20:58" 1759 . "06-10-2018 21:54" 370 1849652584000.0005 "06-10-2018 23:48" 271 . "06-10-2018 22:42" 261 . "06-10-2018 22:30" end format %tcnn/dd/ccYY_hh:MM Stage1
Comment