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.