<?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: JSL Script to Initialize Data as Date Sequence in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1452#M1452</link>
    <description>Thanks mpb and MS.  Both suggestions were very helpful.  I'm learning a lot about lists from this exercise.  I had to modify MS' code to add an extra row for the edate (edate - sdate + 86400).  &lt;BR /&gt;&lt;BR /&gt;I've been playing with how to format the sdate and edate EditNumber fields to display the entered data as mm/dd/yyyy instead of a number.  I can't seem to get that to work.  Any suggestions on how to accomplish this?  Thanks.</description>
    <pubDate>Thu, 04 Mar 2010 16:25:42 GMT</pubDate>
    <dc:creator>terapin</dc:creator>
    <dc:date>2010-03-04T16:25:42Z</dc:date>
    <item>
      <title>JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1449#M1449</link>
      <description>I'm trying to write some JSL code that will:&lt;BR /&gt;&lt;BR /&gt;1) prompt user for starting and ending dates for range of data to initialized&lt;BR /&gt;&lt;BR /&gt;2) create new table and have this table add the number of rows equal to end date - start date, initialize new column with dates that increment by 1 day per row.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any suggestions on how to accomplish this?  I've included my test code so far.  Thanks.&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Dialog(&lt;BR /&gt;VList(&lt;BR /&gt;LineUp(2,&lt;BR /&gt;"Set Initial Date as mm/dd/yyyy", sdate=EditNumber(),&lt;BR /&gt;"Set Ending Date as mm/dd/yyyy", edate=EditNumber()),&lt;BR /&gt;HList(Button("OK"), Button("Cancel"))));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;New Table( "Untitled 4",&lt;BR /&gt;	Add Rows(edate-sdate ),&lt;BR /&gt;	New Column( "Sequential Dates",&lt;BR /&gt;		Numeric,&lt;BR /&gt;		Continuous,&lt;BR /&gt;		Format( "m/d/y", 12 ),&lt;BR /&gt;		Input Format( "m/d/y" ),&lt;BR /&gt;		Set Values(sequence(sdate,edate,1,0)&lt;BR /&gt;			[]&lt;BR /&gt;		)&lt;BR /&gt;	)&lt;BR /&gt;)</description>
      <pubDate>Wed, 03 Mar 2010 17:49:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1449#M1449</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2010-03-03T17:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1450#M1450</link>
      <description>I just made a few changes to your test code to make it work the way I think you want it. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Mar 2010 23:24:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1450#M1450</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-03-03T23:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1451#M1451</link>
      <description>I had trouble with the format m-d-y so I changed it to m/d/y. Also I added one extra row in order to include the end date, and I used the "In Days(1)" function in place of the explicit calculations of seconds in a day.&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2010 15:24:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1451#M1451</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-04T15:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1452#M1452</link>
      <description>Thanks mpb and MS.  Both suggestions were very helpful.  I'm learning a lot about lists from this exercise.  I had to modify MS' code to add an extra row for the edate (edate - sdate + 86400).  &lt;BR /&gt;&lt;BR /&gt;I've been playing with how to format the sdate and edate EditNumber fields to display the entered data as mm/dd/yyyy instead of a number.  I can't seem to get that to work.  Any suggestions on how to accomplish this?  Thanks.</description>
      <pubDate>Thu, 04 Mar 2010 16:25:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1452#M1452</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2010-03-04T16:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1453#M1453</link>
      <description>I do not have the m/d/y option for column format and if I choose by JSL I get an error. That's why I changed to m-d-y. However the dialog in the script accepted dates given as m/d/y. Maybe an OS or OS localization "feature" (here JMP 8.0.2 running on Swedish Mac OS X).</description>
      <pubDate>Thu, 04 Mar 2010 17:01:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1453#M1453</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-03-04T17:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1454#M1454</link>
      <description>Try the following modified script. I don't see an easy way to do validation of the entered dates though I think it can be done with some effort.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2010 17:46:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1454#M1454</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-04T17:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1455#M1455</link>
      <description>I tried your new code but the values displayed in the dialog box are still numeric and not displayed as date.  That is, entering 01/01/2010 becomes 3345148800.  Not sure why it worked for you and not me.</description>
      <pubDate>Thu, 04 Mar 2010 18:13:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1455#M1455</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2010-03-04T18:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1456#M1456</link>
      <description>Are you sure you ran the most recent code? It has EditText boxes instead of Edit Number boxes. There's no way the text entered could be converted to a JMP date number in the dialog. Try running it after closing and then opening JMP. And yes, I just started up JMP and copy/pasted the new code into a script window. It ran successfully. Let me know how it goes.</description>
      <pubDate>Thu, 04 Mar 2010 21:06:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1456#M1456</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-04T21:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Script to Initialize Data as Date Sequence</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1457#M1457</link>
      <description>Sorry mpb,&lt;BR /&gt;&lt;BR /&gt;I was total dork and didn't notice that shifted from EditNumber to EditText.  The code worked like a charm, as you thought it would.  Thanks a ton for your help with this.&lt;BR /&gt;&lt;BR /&gt;Ron</description>
      <pubDate>Thu, 04 Mar 2010 21:27:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Script-to-Initialize-Data-as-Date-Sequence/m-p/1457#M1457</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2010-03-04T21:27:44Z</dc:date>
    </item>
  </channel>
</rss>

