My date is in the format %tCMonth_dd,_CCYY_HH:MM
Yet, the "week" and "year" commands are not recognized, and return null (.) values.
The code I am trying to run is:
gen week = week(wdatetime)
gen year = year(wdatetime)
I have tried converting the date variable to %td, %tc etc. but with no luck
Yet, the "week" and "year" commands are not recognized, and return null (.) values.
The code I am trying to run is:
gen week = week(wdatetime)
gen year = year(wdatetime)
I have tried converting the date variable to %td, %tc etc. but with no luck
Comment