Hello,
I have a dataset with a date variable that is in long format. It's a numeric variable, but Stata is still reading it as a string variable. I have already tried the conversion from string to numeric option, but it says that it is already in numeric format so it cannot convert it. When I try to merge this dataset with another dataset and match on ID and date, it tells me that this date variable is in string format while the other is in numeric format so it cannot merge. I also tried encoding it, but it still reads it as string. Does anyone know how to work with dates in stata and have them be read as numeric variables (byte or double format)? My date variable is currently in long format (yyyymmdd).
Any help is much appreciated!
I have a dataset with a date variable that is in long format. It's a numeric variable, but Stata is still reading it as a string variable. I have already tried the conversion from string to numeric option, but it says that it is already in numeric format so it cannot convert it. When I try to merge this dataset with another dataset and match on ID and date, it tells me that this date variable is in string format while the other is in numeric format so it cannot merge. I also tried encoding it, but it still reads it as string. Does anyone know how to work with dates in stata and have them be read as numeric variables (byte or double format)? My date variable is currently in long format (yyyymmdd).
Any help is much appreciated!
Comment