Hi,
I briefly dug into this and could not find an answer. I have 3 variables: a date variable, a time variable, and an am/pm indicator for the date/time an incident was reported and for when it occurred. For each, I'd like to replace the 2 time variables with 1 military time variable. I think this involves the clock function but I'm getting error codes. Could anyone help? My dataset looks like this:
inci_id date_rept time_rept_1 time_rept_2 date_occu time_occur_1 time_occur_2
20013 1/1/2020 12:24:00 AM 1/1/2020 12:15:59 AM
Thank you!
Tom
Related Posts with using a separate time variable and am/pm indicator variable to generate a military time variable
Pasting the data from Excel to Stata converts values of the variableDear Stata Members I am dealing with some financial data like income, total assets, etc. Many of the…
Selecting all dates within groups that are within one week of each other and creating a sub-group idHello all, I'm a new Stata user and new to Statalist; I'm currently using StataMP 14. Purpose: I'm…
Loop with consecutive numbersHello Stata community, I am trying to replace multiple id of a data set, where the ids are consecut…
Create new variable of survey dataHello. I'm working with survey data from the Eurobarometer survey. I want to create a new variable, …
Selecting dates within groups based on specific criteria in order to create a more unique idHello all, I'm a new Stata user and new to Statalist; I'm currently using StataMP 14. I'm doing so…
Subscribe to:
Post Comments (Atom)
0 Response to using a separate time variable and am/pm indicator variable to generate a military time variable
Post a Comment