date variable

  1. L

    Creating date variable from two separate variables

    Hi all Is it possible to use Syntax to create a date variable (format dd-mm-yyyy hh:mm) from two variables 'date' and 'time' that contain said information in format dd-mm-yyyy and hh:mm, respectively? I have a large dataset so doing it all manually is not the preferred option.
  2. M

    New ID variable using date variable

    I have a ID# for all my teachers but I noticed that there are some instances that an 2 or more teachers can have the same ID#. I want to create another unique ID# for teachers using my old ID # plus the month and date of their birthday. I have a day of birth variables which is storage as date...
  3. J

    Monthly date variable from integers

    I have a variable that takes values 1,2,3...39. Each value indicates a month-year. How could I create a date variable in STATA with this information, starting in 2009m10. Thanks in advance.
  4. M

    Remove the time of a date variable

    Remove the hour of a date variable I have a date variable that looks like this: 01apr2014 17:06:55 The storage type for this variable is double and display format %tc I just need the date, that is 01apr2014. How can I delete the time. Thank you, Marvin
  5. H

    Date variable for Time Series Modeler

    Hi, I have a huge table of DAILY data for 20 years. I have variable of type date, which indicates each day of my data. So i want to use it for Time series forecasting. But it s not recognized as date and I\m forced to define dates. This doesn't help, because thus I cannot use by Date variable...
  6. 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...
  7. S

    Customize x-axis in chart builder for line graph when variable is in "date" format

    I am attempting to customize the x-axis of a 5-year line graph to show all of the dates (not just January and July). However, when the mth/yr variable is in the "date" format, the chart builder does not allow me to customize the axis in this way. Any help would be greatly appreciated! Thank you
  8. Z

    SA ETS - Date Variable

    Hello, In order for the SAS ETS procedures to work there should be a date variable in the data set. This variable must be equally spaced. If there are missing values we should place the ".". If there are non working days e.g. weekends then we should not include any dates that correspond to...