<?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: Date-Time Format Problem in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52837#M29924</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8683"&gt;@Artemio&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;This is actually a pretty simple fix that requires no scripting (though you can script this).&amp;nbsp; In the absence of direct input from you about the date format, JMP is going to guess.&amp;nbsp; It very often gets this wrong with 2-digit years.&amp;nbsp; When you go to open the file, you should see some options like this (at least on Windows):&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="OpenCSV.PNG" style="width: 678px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9762i273F9B93594D6CA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="OpenCSV.PNG" alt="OpenCSV.PNG" /&gt;&lt;/span&gt;Make sure to select "Data with Preview" when you open it so you will have a chance to specify the informat of the date column.&amp;nbsp; You will see a window that lets you modify the import settings for the csv file.&amp;nbsp; If you click "Next", you will get to set the informat setting on the next page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you click the red-arrow next to the column with the date format you need to set, you will get the list of informats available.&amp;nbsp; Select Time &amp;gt; "y/m/d h:m:s".&amp;nbsp; Now you can import.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="InformatSelect.PNG" style="width: 444px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9763i119C12DAE96FFF86/image-size/large?v=v2&amp;amp;px=999" role="button" title="InformatSelect.PNG" alt="InformatSelect.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you want to know how to script this import setting, check out the Source script on the resulting data table.&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 19:26:55 GMT</pubDate>
    <dc:creator>cwillden</dc:creator>
    <dc:date>2018-03-08T19:26:55Z</dc:date>
    <item>
      <title>Date-Time Format Problem</title>
      <link>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52831#M29922</link>
      <description>&lt;P&gt;Date Time Format Problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;am having an issue with a date-time format import from a csv file.&amp;nbsp; An example of the original data content is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;17/09/08 02:55:16 AM&lt;/P&gt;&lt;P&gt;17/09/14 00:44:41 AM&lt;/P&gt;&lt;P&gt;17/09/30 17:57:06 PM&lt;/P&gt;&lt;P&gt;17/10/07 00:26:32 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The format is yy/mm/dd hh:mm:ss AM.&amp;nbsp; The problem is that JMP does not convert the data into proper format.&amp;nbsp; A straight import results in&lt;/P&gt;&lt;P&gt;17/09/2008 02:55:16 AM;&amp;nbsp;which is the wrong date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to format the column with&lt;/P&gt;&lt;P&gt;Column(dt1, 2) &amp;lt;&amp;lt;Set Name("Date and Time")&amp;lt;&amp;lt;Data type("Numeric")&amp;lt;&amp;lt;Set Modeling Type( Continuous &amp;lt;&amp;lt;Informat( "y/m/d h:m:s" )&amp;lt;&amp;lt;Format("d/m/y h:m:s");&lt;/P&gt;&lt;P&gt;The result is the same à 2008/09/17 02:55:16 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A different approach, insert a new column and use a formula&lt;/P&gt;&lt;P&gt;dt1 &amp;lt;&amp;lt;New Column("Date", Numeric, Continuous, Format Date("y/d/m"), Formula( Left("20"||Munger(Loc,6,"20",""), 10)));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is a string 2017/09/08; but the output needs to be numeric.&amp;nbsp; Visually, great a step closer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since things are bit closer, the next three pieces of code were implemented.&lt;/P&gt;&lt;P&gt;dt1 &amp;lt;&amp;lt;New Column("Date1", Numeric, Continuous, Format Date("y/d/m"), Formula( Informat(Left("20"||Munger(Loc,6,"20",""), 10))));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt1 &amp;lt;&amp;lt;New Column("Date2", Numeric, Continuous, Format Date("yyyy/dd/mm"), Input Format("yyyy/dd/mm"), Formula( Parse Date(Left("20"||Munger(Loc,6,"20",""), 10))));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt1 &amp;lt;&amp;lt;New Column("Date3", Numeric, Continuous, Format Date("yyyy/dd/mm"), Input Format("yyyy/dd/mm"), Formula( As Date(Left("20"||Munger(Loc,6,"20",""), 10))));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ResulTs are&lt;/P&gt;&lt;P&gt;Date1 column --&amp;gt; 3587673600 &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date2 column --&amp;gt; 3587673600&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date3 column --&amp;gt; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Date 1 and Date 2 results are numeric but with the wrong format.&amp;nbsp; How can I get the right format i.e. numeric, continuous, and date format?&amp;nbsp; Thank you for help.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:53:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52831#M29922</guid>
      <dc:creator>Artemio</dc:creator>
      <dc:date>2018-03-08T18:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date-Time Format Problem</title>
      <link>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52837#M29924</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8683"&gt;@Artemio&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;This is actually a pretty simple fix that requires no scripting (though you can script this).&amp;nbsp; In the absence of direct input from you about the date format, JMP is going to guess.&amp;nbsp; It very often gets this wrong with 2-digit years.&amp;nbsp; When you go to open the file, you should see some options like this (at least on Windows):&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="OpenCSV.PNG" style="width: 678px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9762i273F9B93594D6CA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="OpenCSV.PNG" alt="OpenCSV.PNG" /&gt;&lt;/span&gt;Make sure to select "Data with Preview" when you open it so you will have a chance to specify the informat of the date column.&amp;nbsp; You will see a window that lets you modify the import settings for the csv file.&amp;nbsp; If you click "Next", you will get to set the informat setting on the next page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you click the red-arrow next to the column with the date format you need to set, you will get the list of informats available.&amp;nbsp; Select Time &amp;gt; "y/m/d h:m:s".&amp;nbsp; Now you can import.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="InformatSelect.PNG" style="width: 444px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9763i119C12DAE96FFF86/image-size/large?v=v2&amp;amp;px=999" role="button" title="InformatSelect.PNG" alt="InformatSelect.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you want to know how to script this import setting, check out the Source script on the resulting data table.&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 19:26:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52837#M29924</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-03-08T19:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date-Time Format Problem</title>
      <link>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52846#M29928</link>
      <description>&lt;P&gt;Hello Cameron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the quick reply.&amp;nbsp; Your suggestion was my initial inclination but it does not work.&amp;nbsp; JMP processes the file and automatically changes the date to something that is not correct.&amp;nbsp; For example, 17/09/08 02:23:52 is imported as 17/09/2008 02:23:52 AM; which is wrong.&amp;nbsp; Since the output is incorrect, I had to explore other options (JSL) -modify and correct the output.&amp;nbsp; Thank you for your input.&amp;nbsp; It is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 20:02:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52846#M29928</guid>
      <dc:creator>Artemio</dc:creator>
      <dc:date>2018-03-08T20:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date-Time Format Problem</title>
      <link>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52850#M29930</link>
      <description>&lt;P&gt;I'm guessing you did something wrong because I was able to correctly import all the values you put as examples.&amp;nbsp; I pasted them into excel, saved as a CSV, and then imported using the steps I outlined and got this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatesImported.PNG" style="width: 311px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9767iEB5E6E39926D66AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="DatesImported.PNG" alt="DatesImported.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DatesColumnInfo.PNG" style="width: 379px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9768i7CC509B7AEE28B5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="DatesColumnInfo.PNG" alt="DatesColumnInfo.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 20:10:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52850#M29930</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-03-08T20:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date-Time Format Problem</title>
      <link>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52867#M29936</link>
      <description>&lt;P&gt;Hello Cameron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got a hold of other csv files that have the same format.&amp;nbsp; I followed your instructions with a different csv file and this time it worked as you have suggested.&amp;nbsp; Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 22:10:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-Time-Format-Problem/m-p/52867#M29936</guid>
      <dc:creator>Artemio</dc:creator>
      <dc:date>2018-03-08T22:10:57Z</dc:date>
    </item>
  </channel>
</rss>

