Hi, I am trying to make a new variable called "date" using the month and year in my dataset. The variable "month" is a byte and the variable "year" is an int. I would like to make it into the format <year>m<month> and call this variable date. For example, month 01 (january) and year 2022 would become 2022m01. This variable should be a float. I'm unsure of how to convert these two variables into a single float variable with that format. Thanks.
Related Posts with Date format using month and year
Changing a string variable with various characters into a numerical (categorical) variableHi! I am fairly new to Stata and looking to organize one of my variables within a dataset. it is a l…
Can Inverse probability of censoring weighting (IPCW) approach be applied in stata?Hi all, I wonder if anyone is familar with IPCW model and has revelant example with stata codes to …
Joining frequency and percentage in same columnAny idea on how one can join the frequency and percentage into one column and order the row labels i…
Help to interpret psmatch2 messages and resultsHi, I want to run a regression to compáre yield at issuance of green and non-green bonds. In order t…
Identify where in variable list a certain value appearsSorry for the basic question. I have a dataset with 100-variable list from v1-v100 with >10k obs…
Subscribe to:
Post Comments (Atom)
0 Response to Date format using month and year
Post a Comment