Hello,
I am conducting a data analysis involving date variables (date of birth, date of evaluation etc.) and I am trying to 1) sort my dates in ascending order, 2) group the dates by year ONLY to be able to create a "year of birth" variable. However, when I try to sort my dates using the sort command, Stata fails to do so. The dates are still mixed up when I browse the data. I have tried converting my date string variable into a numeric variable and put the dates into date format, but this has not worked. The dates are still out of order.
Has anyone else had this issue before? Would be grateful for any advice.
Thank you!
Marie
I am conducting a data analysis involving date variables (date of birth, date of evaluation etc.) and I am trying to 1) sort my dates in ascending order, 2) group the dates by year ONLY to be able to create a "year of birth" variable. However, when I try to sort my dates using the sort command, Stata fails to do so. The dates are still mixed up when I browse the data. I have tried converting my date string variable into a numeric variable and put the dates into date format, but this has not worked. The dates are still out of order.
Has anyone else had this issue before? Would be grateful for any advice.
Thank you!
Marie
Comment