Calculating Event Duration Using Dates - University …
Data Resource Centre, University of Guelph
SPSS ? CALCULATING EVENT DURATION USING DATES
There are two methods that can be employed to determine the duration of an event. The first method uses the Compute Variable function and the second utilizes Data and Time Wizard function. Both can be found in the Tool Bar under Transform.
Method One ? Compute Variable
Within SPSS date/time values are stored as the number of seconds since the start of the Gregorian calendar which is October 14, 1582. To get the duration of an event you will need to subtract the end date (end) from the start date (beg). The results will be reported number of seconds. To convert the results to the number of days divide by the number of seconds in a day which is 86,400 seconds/day (= 24 hours/day * 60 minutes/hours * 60 seconds/minutes).
Here are the steps
1. Click on Transform>Compute Variable. 2. Type in a name of single target variable. It can be an existing variable or a new variable to be added to the working file. 3. The numeric expression will subtract the end date (end) from the start date (beg) and will take on this
form: (end-beg)/(24*60*60).
1/14/2009 1:39:00 PM
Page 1
Data Resource Centre, University of Guelph
SPSS ? CALCULATING EVENT DURATION USING DATES
Method Two - Data and Time Wizard The Date and Time Wizard offers assistance for performing common tasks associated with date and time variables. The steps below outline how to calculated the length of time between a start and end date.
Here are the steps:
1. Click on Transform>Date and Time Wizard and the following screen appears. Click on the Calculate with date and times option.
1/14/2009 1:39:00 PM
Page 2
Data Resource Centre, University of Guelph
SPSS ? CALCULATING EVENT DURATION USING DATES
2. In the next window select the "Calculated the number of time units between two dates" option.
1/14/2009 1:39:00 PM
Page 3
Data Resource Centre, University of Guelph
SPSS ? CALCULATING EVENT DURATION USING DATES
3. In this window, select the end date for the Date1 and the start date for Date2 and the units you would like the results to be represented in such as years, months, weeks, days, hours, minutes or seconds.
1/14/2009 1:39:00 PM
Page 4
Data Resource Centre, University of Guelph
SPSS ? CALCULATING EVENT DURATION USING DATES
4. In the last window, the result variable is specified along with it's variable label. Click on the Finish button and once the calculation is complete the result can be found in the Data View under this variable.
Need Additional Help? If you require additional assistance with using SPSS please feel free to contact the Data Resource Centre located on the first floor of the library behind the reference desk. You can either drop-in, phone x56417 or email drc@listserv.uoguelph.ca.
1/14/2009 1:39:00 PM
Page 5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- calculating event duration using dates university
- cds time conversion software and its application
- fundamental concepts nasa
- harnessing the power of sas iso 8601 informats
- date conversions in sdtm and adam datasets
- using date and date time in formulas
- time conversion chart
- iso 8601 an international standard for date and
- using query patterns to learn the duration of events
- injection moulding calculations
Related searches
- calculating wisconsin retirement using etf
- calculating percent yield using equivalents
- calculating molarity using solute moles
- calculating grades using points
- tableau using dates in calculations
- using dates in if formula
- if statements using dates in excel
- using if statements with dates in excel
- calculating duration between 2 dates
- using dates in sas
- liberty university spring break dates 2019
- calculating ion molarity using solute mass calculator