<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Breaking down time of day into shifts in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217815#M43544</link>
    <description>&lt;P&gt;I amended my solution to use literal times instead of computing them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
	06:00:00 &amp;lt;= :CST &amp;lt; 12:00:00, "Morning Shift",
	12:00:00 &amp;lt;= :CST &amp;lt; 21:00:00, "Afternoon Shift",
	"Night Shift",
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think that it improves the legibility&amp;nbsp;and efficiency of this formula.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2019 11:09:30 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2019-07-17T11:09:30Z</dc:date>
    <item>
      <title>Breaking down time of day into shifts</title>
      <link>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217776#M43530</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have time data that I would like to breakdown into shifts to analyze shift patterns&amp;nbsp;&lt;BR /&gt;9:00PM-5:59AM = night shift&lt;/P&gt;
&lt;P&gt;6:00AM-11:59AM = morning shift&lt;/P&gt;
&lt;P&gt;12:00PM-8:59PM = afternoon shift&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone provide any guidance on how to do this with a formula or script? I'm a beginner and am just using recode which is very slow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Time column.JPG" style="width: 134px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18330iB8E3B459D60DE7A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Time column.JPG" alt="Time column.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 20:49:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217776#M43530</guid>
      <dc:creator>lizrdee</dc:creator>
      <dc:date>2019-07-16T20:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking down time of day into shifts</title>
      <link>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217788#M43533</link>
      <description>&lt;P&gt;You can copy this script and then paste it as the formula for the second column:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
	In Hours( 6 ) &amp;lt;= :CST &amp;lt; In Hours( 12 ), "Morning Shift",
	In Hours( 12 ) &amp;lt;= :CST &amp;lt; In Hours( 21 ), "Afternoon Shift",
	"Night Shift",
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can't test it but you can!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 20:27:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217788#M43533</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-07-16T20:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking down time of day into shifts</title>
      <link>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217790#M43534</link>
      <description>&lt;P&gt;You might find value in&amp;nbsp;&lt;LI-MESSAGE title="Using dates, times, datetimes and durations in JMP" uid="68689" url="https://community.jmp.com/t5/JMPer-Cable/Using-dates-times-datetimes-and-durations-in-JMP/m-p/68689#U68689"&gt;&lt;/LI-MESSAGE&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 20:50:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217790#M43534</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2019-07-16T20:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking down time of day into shifts</title>
      <link>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217795#M43536</link>
      <description>&lt;P&gt;Thank you so much it worked! I was wondering how to format the formula so this was really helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 22:13:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217795#M43536</guid>
      <dc:creator>lizrdee</dc:creator>
      <dc:date>2019-07-16T22:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Breaking down time of day into shifts</title>
      <link>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217815#M43544</link>
      <description>&lt;P&gt;I amended my solution to use literal times instead of computing them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
	06:00:00 &amp;lt;= :CST &amp;lt; 12:00:00, "Morning Shift",
	12:00:00 &amp;lt;= :CST &amp;lt; 21:00:00, "Afternoon Shift",
	"Night Shift",
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think that it improves the legibility&amp;nbsp;and efficiency of this formula.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 11:09:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Breaking-down-time-of-day-into-shifts/m-p/217815#M43544</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-07-17T11:09:30Z</dc:date>
    </item>
  </channel>
</rss>

