Hi everyone I would like to extract the day of the week from a DMY form in stata. So below is the code is used to convert my time variable into a stata readable form.
gen double date2 = clock( MealEventtime , "#DMYhm")
gen double date3 = round(date2, 3e5)
format %tc date3
rename date3 eventtime
The dow function seems to produce all empty data points. I think this is because it wants it in a MDY not DMY.
Any ideas on how i can solve this?
Cheers,
Daniel
gen double date2 = clock( MealEventtime , "#DMYhm")
gen double date3 = round(date2, 3e5)
format %tc date3
rename date3 eventtime
The dow function seems to produce all empty data points. I think this is because it wants it in a MDY not DMY.
Any ideas on how i can solve this?
Cheers,
Daniel