Re: Separate shifts within date time variable

Posted by parisec on
URL: http://spssx-discussion.165.s1.nabble.com/Separate-shifts-within-date-time-variable-tp5740995p5740999.html

Appreciate all of the feedback!

I extracted out the time from the date to create the ordertime variable.

The variable is HH:MM in 24 hour time.

This worked.

compute testtime = $sysmis.
   if (ordertime ge TIME.HMS (00,00) and ordertime le TIME.HMS (10,59)) testtime=1 .
   if (ordertime ge TIME.HMS (11,00)) testtime=2.
         freq testtime.

Thank you all for your time.
Carol