I'm still working with dates and now have a new problem. If I have a date 22dec2014, I want 1 day before that, which is 21dec2014, I could do
Code:
gen date_pre1 = mdy(month(date), day(date)-1, year(date))
Thanks a lot for any help.
Specialized on Data processing, Data management Implementation plan, Data Collection tools - electronic and paper base, Data cleaning specifications, Data extraction, Data transformation, Data load, Analytical Datasets, and Data analysis. BJ Data Tech Solutions teaches on design and developing Electronic Data Collection Tools using CSPro, and STATA commands for data manipulation. Setting up Data Management systems using modern data technologies such as Relational Databases, C#, PHP and Android.
gen date_pre1 = mdy(month(date), day(date)-1, year(date))
0 Response to create the day before a date
Post a Comment