I need help to calculate the time difference between two times. However, both variables are in string format and contain "NA". I need to find a way to exclude the NA from the calculation of the time difference. Your help will be appreciated.
A sample of the data is displayed below.
A sample of the data is displayed below.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str8(time_of_lea_placement time_of_delivery) "09:30:00" "15:35:00" "17:15:00" "19:37:00" "08:22:00" "17:18:00" "NA" "19:57:00" "19:50:00" "07:34:00" "14:10:00" "18:18:00" "NA" "14:52:00" "08:00:00" "13:08:00" "10:00:00" "14:37:00" "22:45:00" "15:36:00" "07:40:00" "13:38:00" "10:31:00" "16:21:00" "09:50:00" "16:51:00" "NA" "18:10:00" "17:10:00" "21:28:00" "19:45:00" "21:01:00" "NA" "13:25:00" "09:00:00" "17:06:00" "08:20:00" "15:30:00" "15:07:00" "19:00:00" end
Comment