Time of Day Variables

Time of Day responses write out multiple variables to the final data file, depending upon what components were collected: Full Time or Hour and Minutes only.

Tip: The component variables (hour, minute, and second parts) will always appear at the end of a QDS dataset variable listing rather than being listed with their corresponding composite variable.

Full Time

When the components option on the Response Set tab is set to collect a full time (hour, minute, second), the full value is written out to a variable with the Data Element tab variable name. Separate hour, minute, and second variables are written out with the values entered for each selected component.

For example, for a full time response of 03:45:30 named TIME, the following variables would be written to the data file:

  • TIME = 03:45:30
  • TIMEH = 03
  • TIMEM = 45
  • TIMED = 30

Partial Time

When the components option on the Response Set tab is set to collect “Hour and Minute Only”, the time value is written out to a variable with the Data Element tab variable name. Hour and minute component variables are also written out.

For a Hour and Minute time response of 03:45 named TIME, the following variables would be written to the Data File:

  • TIME = 03:45:00
  • TIMEH = 03
  • TIMEM = 45

The “full” time will be written out as 03:45:00, where the unknown seconds are written as “00”.

If “Hour Only” is collected, there will only be a single numeric variable for the Hour.

Allowing Minutes or Seconds Missing

If the option for “Allow Missing Seconds” (Full Time or Hour/Minute) or “Allow Missing Minutes” (Full Time) is enabled on the Response Set tab then a full time is collected where the substituted value is used for any missing data.

Tip: The RTF Codebook indicates if a missing componentClosedA component variable is one part of a composite variable. Check Each, ranking, date, time, and time span response types all have composite and component variables. A Check Each component represents whether or not a response was selected. A ranking component represents the rank selected. A date, time, or time span component represents that part of the whole date or time, such as year, month, weeks, hour or minute. is allowed following the range; the CSV codebook indicates this in the Notes column.

In the image below, a “30” is used for missing seconds or minutes. A valid number between 0 and 60 must be entered in the Minutes or Seconds box.

Time of Day option allow missing minutes/seconds

For a full time response where the minutes and seconds were missing, the following variables would be written to the data file:

  • TIME = 03:30:30
  • TIMEH = 03
  • TIMEM = 30
  • TIMED = 30

The full time shows the substituted values of “30” for minute and second, which are also written out to the minute and second components. These missing values are not used when performing calculations within QDS (the numeric range is used).