Hi,
I have a question concerning converting a string to a time variable. I have start and end times in the format DMYhms saved as strings (originally saved in SPSS). These I want to convert to time variables. I do this by running these commands:
But the conversion seems not to be accurate, Stata reports slightly different times than the original string contains. Any suggestions what is going on here?
I have a question concerning converting a string to a time variable. I have start and end times in the format DMYhms saved as strings (originally saved in SPSS). These I want to convert to time variables. I do this by running these commands:
Code:
generate time_begun = clock(StartTime, "DMYhms")
format time_begun %tc
generate time_finished = clock(FinishTime, "DMYhms")
format time_finished %tc