Hello, I am working with a dataset from 2016 and would like to identify the day of the week from the date variable (date), which provides date in ymd format (i.e. 20160514). I attempted the code:
format date %td
gen DOW = dow(date)
but it only generated missing values for the DOW variable. I would greatly appreciate any insight to this code, thank you very much.
Related Posts with Assistance with dow command
assign variable label to variable nameHi I have a dataset that has some variables, say, X1-X10. The corresponding variable labels are 2018…
What should I do to achieve the following result.? Code: * Example generated by -dataex-. For more info, type help dataex clear input str3 code str29 …
Creating an Abortion scaleHello Everyone, I am trying to create a 7-point scale for attitudes towards abortion for every dec…
how to calculate output of r(alpha) (short example included)?My deepest apologies if this is difficult to work with. I'm not a stata user, i'm just trying to dec…
Create new variables using two categorical variablesI have three variables gender sector and wf. Gender and sector are categorical variables, where gend…
Subscribe to:
Post Comments (Atom)
0 Response to Assistance with dow command
Post a Comment