This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help
Listed below are the instructions for creating variables to calculate an amount of time, such as duration of a wait and then put the figure into a time period, based on the difference between a time of arrival variable and a time of departure variable.
Data will have already been entered into the questionnaires, including answers to the time variables (the variables must have a response type of Time). For this example, Q1b is the time of arrival and Q1c is the time of departure.
Name: Wait
Label: Duration of time
Type: Derived (the variable will derive its data from other existing variables).
Response: Quantity (the response will be a numeric value for each case).

Code |
Code Label |
Value |
NA |
Not Asked |
Q1b Missing |
OK |
Valid |
Q1c-Q1b |

The Not Asked value is specified to ensure that the calculation is only performed if data exists for the time question.
Name: Waittime
Label: Duration of stay
Type: Numeric (the variable specifies numeric values).
Response: Single (each respondent will only fall into one of the new codes).
. Enter Wait as the Source (this is the name of the derived variable we have just set up above).
Code |
Code Label |
Value |
1 |
Under 30 minutes |
0 to 1799 |
2 |
30-60 minutes |
1800 to 3659 |
3 |
1-2 hours |
3660 to 7259 |
4 |
2-3 hours |
7260 to 10859 |
5 |
3-4 hours |
10860 to 14399 |
6 |
Over 4 hours |
14400 to 999999 |

|
See Also |