<?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: calculate week of year based on start time and end time in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61992#M33397</link>
    <description>&lt;P&gt;hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your quick reply. I am wondering is there anyway that&amp;nbsp;be able to summary the start time and end time into week of year and then create filters based on that summary table, so user can click on different weeks of a year to check the different trend?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help!&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jul 2018 17:29:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-07-02T17:29:35Z</dc:date>
    <item>
      <title>calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61989#M33395</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a test that needs me make a calendar of week based on two columns that I have in dat table. By doing so, uses will be able to select different weeks of year to see the trend. Does anyone know the better way to achieve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Winnie&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 17:14:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61989#M33395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-02T17:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61991#M33396</link>
      <description>&lt;P&gt;You may want to use a Calenar Box() to let them select one of the days in the week they want, and then to use that as your input&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
New Window( "Calendar Box Example", Calendar Box() );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="calendar.PNG" style="width: 234px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11366i153FC01C18A4A7A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="calendar.PNG" alt="calendar.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 17:19:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61991#M33396</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-02T17:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61992#M33397</link>
      <description>&lt;P&gt;hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your quick reply. I am wondering is there anyway that&amp;nbsp;be able to summary the start time and end time into week of year and then create filters based on that summary table, so user can click on different weeks of a year to check the different trend?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 17:29:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61992#M33397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-02T17:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61994#M33399</link>
      <description>&lt;P&gt;Are you looking for something like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Aircraft incidents.jmp" );

dt &amp;lt;&amp;lt; New Column( "Work Week", numeric, modeling type( ordinal ), formula( Week Of Year( :event date ) ) );

Current Data Table() &amp;lt;&amp;lt; Data Filter(
	Location( {175, 175} ),
	Mode( Show( 1 ), Include( 1 ) ),
	Add Filter(
		columns( :Work Week ),
		Where( :Work Week == {1, 2, 3, 4, 5, 6, 7, 8} ),
		Display( :Work Week, Size( 160, 225 ), List Display )
	)
);

Oneway( Y( :Total Fatal Injuries ), X( :Location ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Jul 2018 17:54:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/61994#M33399</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-02T17:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/62000#M33404</link>
      <description>&lt;P&gt;That is exactly what I want! Thank you so much for your amazing help!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 18:27:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/62000#M33404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-02T18:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/62027#M33420</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry to bother you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The format of date column in my data table is look like:&amp;nbsp;4/17/18 2:32pm.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use week of year() function, there is an error message showing :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Cannot convert argument to a number [or matrix] 1 times At rows: 2 Operation: Week Of Year, Week Of Year/*###*/(:Test Finish time, 1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Formula evaluation errors have been ignored"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I can't use week of year() function when the column contains time. Could you give me some deriction about how to solve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 21:23:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/62027#M33420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-02T21:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: calculate week of year based on start time and end time</title>
      <link>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/62053#M33421</link>
      <description>&lt;P&gt;The issue is that your time column is a character column, not a numeric column.&amp;nbsp; You need to convert your date column to a numeric Date/Time column.&amp;nbsp; Here is a link to a previous discussion that will lead you through that&lt;/P&gt;
&lt;P&gt;&lt;A title="convert h:mn in mn" href="https://community.jmp.com/t5/Discussions/convert-h-mn-in-mn/td-p/61641" target="_self"&gt;https://community.jmp.com/t5/Discussions/convert-h-mn-in-mn/td-p/61641&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 21:45:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calculate-week-of-year-based-on-start-time-and-end-time/m-p/62053#M33421</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-02T21:45:25Z</dc:date>
    </item>
  </channel>
</rss>

