date

  1. C

    SPSS Fuzzy matching with a date range

    Hi all! I am trying to match cases and controls. I would like to match on sex, age (+/- 3 years), and date of accident (+/- 6 months). I have been using the SPSS fuzzy function to match and have entered 0 and 3 (0 3) but cannot work out how to specify the 6 months fuzzy range for dates...
  2. I

    Calculating mean for Date values using range and counts

    Hi, For the purpose of calculating the average number of days between 2 transactions, I was always 1. subtracting the greater dates from the lesser dates (as in the LEAD functions available in different software and statistical packages) 2. adding the result of step 1 3. dividing the...
  3. D

    I need to merge columns by date into one column

    Hi all, I need to change a dataframe that is has a variable arranged by date like this: ID Var_Day1 Var_Day2 Var_Day3 1 2 66 222 2 5 55 333 3 6 44 555 4 3 33 444 5 4 22 333 into a new dataframe with one column for the variable for all days. Something like this: ID Day Var 1 1 2 2 1...
  4. M

    String date to date variable

    I have a string variable containing dates (1/28/15) (DAateToday) and would like to make it a real date variable. I tried: gen RealDate=date(DateToday, "MDY") But it didnt work. After I have my date variabel I would like to create a variable that only includes the month and year...
  5. G

    recoding to datetime syntax

    I am trying to recode a variable. My original survey asked participants to enter a time of day they do an activity on the half hour, ranging from not applicable (coded as 1) to 12:00am on day 1 (coded as “2”) to 5:30am the following day (day 2; coded as “61”). I asked participants to enter...
  6. M

    Date variable- only month

    Hi Guys, I have a date variable, save in the type below. example 03 Jul 14 DateToday long %dD_m_Y I would like to extract only the month- March. Any thoughts? Thank you in advance, Marvin
  7. C

    Condtional If statement using a date field

    I am trying to code a new variable that uses a date field so that if entries have a date greater than x, they get a 1 and less than that date they get a 0. I am doing this under Transform/Compute I have tried to create an if statement where it equals: if date_var >= 11/07/2012 then...
  8. V

    Summing Weekend values to previous Friday

    I am finding a gap in continuous data that is throwing a wrench in a bivariate VAR. I need a way in SAS to sum the weekend data of one variable in order to match a day by day set of another (stock price data), How do I do that? set1 date var1 20130411 2.3 20120412 3.1...
  9. K

    SAS date formats

    I'm new here and while I've read a bunch on this nothing I do helps. I know this is a newbie question but I am thankful for the help! Basically I want SAS (9.3) to read the date format I have here and output a date. I currently get the "SAS date value". DATA Chap3.myfirstdata; INPUT name...
  10. X

    Stata Project Help (10-12 hour Job)

    Dear All, 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...
  11. K

    SAS Date and time

    Hi There I would like to know if there is a way to know when a particular variable was populated first. For example if I have a table with one of the variables as "First Name", is it possible to know when was the "First Name" variable populated for that particular record. May be a time...