Hello,
I am currently trying to merge two datasets based on the 'date' of the event. Problem is with the format of the date variable as they are not similar across the two datasets. I tried to find a solution based on the previous blog posts but unable to fix the issue. Therefore posting a brief summary of the issue below along the sample dataset and some solution would be helpful please.
Based on the dataset below: The variable 'date1' and 'date2' are from datasets 1 and 2 respectively. I would like to convert both of these variables into the same format using which I would be able to merge the datasets.
Regards
Vignesh.
I am currently trying to merge two datasets based on the 'date' of the event. Problem is with the format of the date variable as they are not similar across the two datasets. I tried to find a solution based on the previous blog posts but unable to fix the issue. Therefore posting a brief summary of the issue below along the sample dataset and some solution would be helpful please.
Based on the dataset below: The variable 'date1' and 'date2' are from datasets 1 and 2 respectively. I would like to convert both of these variables into the same format using which I would be able to merge the datasets.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str22 date1 float date2 "20/01/2007" 17186 "7/02/2007" 17204 "30/03/2007" 17255 "10/02/2007" 17207 "14/02/2007" 17211 "17/02/2007" 17214 "17/02/2007" 17214 "3/03/2007" 17228 "17/02/2007" 17214 "17/03/2007" 17242 end format %td date2
Regards
Vignesh.

Comment