IBM Support

Recoding SPSS Statistics Time Intervals into Categories

Question & Answer


Question

I have an SPSS Statistics data file where each record represents an event that occurred in our work place. There is a time variable called EVENT_TIME which records the time of day when each event occurred. EVENT_TIME is in hh.mm..ss format and ranges from 0:0:0 to 23:59:59. I wish to create a categorical variable which represents the 3 shifts in which the events occurred. Shift 1 is from midnight to 8 A.M.; shift 2, from 8 A.M to 4 P.M.; Shift 3 from 4. PM. to midnight. Exactly midnight will be considered Shift 3; exactly 8 A.M., shift 1; exactly 4 P.M., shift 2. How can I recode the EVENT_TIME variable into the 3 categories described above?

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
16 April 2020

UID

swg21686181