I am trying to extract the years from a datetime variable and do not seem to find a way. I am attaching images of what I see on STATA. Can someone explain to me in a simple way what I should do?
Thank you in advance!
I have a range of dates from ~1950 to the present that are in the 5 digit Excel/Microsoft date code. I'd like to create date ranges.
I'm looking for something like
recode date into year
(42005 thru 42369) = 2015
(the above syntax might be off by a bit, but you get the picture!)...
I have a table with dates (every day, ascending order), where each row is the flowing day, and a column with number of expressions. Something like this:
Day 1 | 20 expressions
Day 2 | 23 expressions
I need to see if there is significance between two periods: up to day...
I need to create variables that splits out a length of stay across years and enters the number of days in each of those years into separate year variables. For example, I have a length of stay for a case of 8.02 years.
CaseID StartDate EndDate
222 12/23/1988 01/01/1997...
I have a large data set, and, in the data set, there are a number of dates entered as string variables (e.g., 05SEP2012).
I need to determine the length of time in years between some of these variables (e.g., from 20MAR1969 to 05SEP2012), but can't seem to figure it out. I have...
Nice to meet you, my first post.
In SPSS, I would like to recode a date (variable StartDate) dd.mm.yyyy to its relevant finanical year (variable FinancialYear - a categorical variable). I can't figure out how to write the code to specify the date ranges, without spending 2 days on...
I need your help regarding one of my projects of Stata software. You must be familiar with dates formatting, system variables and lagging and merging and transposing of data. I understand you would be busy in your job and studies, and that is why I am happy to pay you reasonable...
Does anyone have syntax that can calculate Date Differences but exclude the weekends? I have used the syntax below, but it would add 1 day values if it did not go over 1 week. So if the difference was 2 days the compute function would equal 3. However, it is accurate if it spans over a...