Hi all,
I have a large set of string variables (too large to encode) that contain dates and specific times in the following manner:
09SEP19:09:00:00
I would like to convert it to dates using either
gen new_date_var = date(string_var, "DMY###")
gen new_date_var = clock(string_var, "DMY#hms")
However none of these work apparently because of the : between the Year and the Time (---19:09---) and therefore the new_date_var generates only missing values.
I also tried to use multiple # to account for the additional : but it is not working.
I would highly appreciate any help =)
Thank you for your time!
Related Posts with String to date variable with time when string does not follow the format DMY ## or DMYhms
Aggregating Data under serveral conditionsHej Statalist, I have a problem, as I want to aggregate my panel data under certrain conditions. I …
showing different confidence levels for IRF & positive versus negative shocks (VAR analysis)Hi all I have two basic questions for a VAR analysis: 1- I am estimating a var and plotting the orth…
Data query with odbc: from R to StataHi all! I just got access to a SQL Server, where there is a database storing a number of metrics, t…
Why im I getting a positive result with log-linear regression and a negative with linear-linear?Hi! I'm working on a project where I want to see the effect off an aviation tax on total passangers…
Panel graph flightdataI'm using flightdata from origin to destination per year and quarter. I want to make a graph giving …
Subscribe to:
Post Comments (Atom)
0 Response to String to date variable with time when string does not follow the format DMY ## or DMYhms
Post a Comment