Hello,
I have a string variable (str10) which I want to convert into date so i can add and subtract days.
Array
This string variable is formatted in the ddmmyyyy format but some of the values are recoded as "NA" or "na" if the date is missing. When I use
gen new_date_variable = date(date_variable, dmy)
Stata just returns missing values for all.
Could anyone suggest what is the problem and how should i rectify ? Many Thanks
Related Posts with converting string to date returns missing values
Multilevel model error with covariance (unstructured) - Hessian is not negative semidefinite conformability errorI'm testing a multilevel model with random slopes and a covariance structure for the error and reml …
Merging datasetsI have two datasets that I want to merg- One from the screening registry and the other one from a ho…
Using mrobust with polynomial independent variableDear community, I'd like to use the "mrobust" command by Young & Holsteen (2017) for estimating…
Value labels: re-coding, assigning multiple labels to one value and differentiation in variablesHi all, I want to recode two of my value labels, which are used for multiple variables. The first …
Regressions with lagged structure using loop commandHi everyone, I have run the following regressions using the loop command which works just fine: C…
Subscribe to:
Post Comments (Atom)
0 Response to converting string to date returns missing values
Post a Comment