Dear all,
My time variables are recently coming out differently, despite my code remaining the same and despite my raw data format remaining the same. My code is validated and tested to perform also on future exports from a database system. Recently I noticed that when converting a time string into a time format, the date '01Jan1960' is included in the time additionally. My feeling is that this is potentially related to the recent release of Stata v18.0 in my institute as all other factors have remained constant.
Example data:
Would anyone happen to know what could be causing this, but more importantly how I can fix this?
Thank you and best wishes,
Moniek
My time variables are recently coming out differently, despite my code remaining the same and despite my raw data format remaining the same. My code is validated and tested to perform also on future exports from a database system. Recently I noticed that when converting a time string into a time format, the date '01Jan1960' is included in the time additionally. My feeling is that this is potentially related to the recent release of Stata v18.0 in my institute as all other factors have remained constant.
Example data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str5 time_var "10:00" end
Code:
assert length(time_var) == 5 gen time_var_new = clock(time_var, "hm") format time_var_new %tcHH:MM order time_var_new, after(time_var) drop time_var rename time_var_new time_var
Thank you and best wishes,
Moniek
Comment