<?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: How to convert string into dates. Example: 06-AUG-2018 --&amp;gt; Date in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-into-dates-Example-06-AUG-2018-gt-Date/m-p/66774#M34494</link>
    <description>&lt;P&gt;Informat will work for you. No need to specify an input format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d="06-AUG-2018";

d1="02-JAN-2016";

d2="08-DEC-1998";


x=informat(d);

x1=informat(d1);

x2 = informat(d2);

show(x, x1, x2);

/*:

x = 06Aug2018;
x1 = 02Jan2016;
x2 = 08Dec1998;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 06 Aug 2018 21:31:56 GMT</pubDate>
    <dc:creator>Jeff_Perkinson</dc:creator>
    <dc:date>2018-08-06T21:31:56Z</dc:date>
    <item>
      <title>How to convert string into dates. Example: 06-AUG-2018 --&gt; Date</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-into-dates-Example-06-AUG-2018-gt-Date/m-p/66770#M34491</link>
      <description>&lt;P&gt;Hi JMP community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know if there is a more efficient way to translate a date string in the format 06-AUG-2018 into a JMP date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I have used in the past:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Local( {t1},
	t1 = Match( Word( 2, :Date of Collection, "-" ),
		"JAN", 1,
		"FEB", 2,
		"MAR", 3,
		"APR", 4,
		"MAY", 5,
		"JUN", 6,
		"JUL", 7,
		"AUG", 8,
		"SEP", 9,
		"OCT", 10,
		"NOV", 11,
		12
	);
	Date MDY(
		t1,
		Num( Word( 1, :Date of Collection, "-" ) ),
		Num( Word( 3, :Date of Collection, "-" ) )
	);
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Where "Date of Collection" is the string date.&lt;/P&gt;&lt;P&gt;I also tried the "In Format" function but I could not figure out how to make JMP understand the abbreviated month (e.g. JAN, FEB...).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 21:05:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-into-dates-Example-06-AUG-2018-gt-Date/m-p/66770#M34491</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2018-08-06T21:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert string into dates. Example: 06-AUG-2018 --&gt; Date</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-into-dates-Example-06-AUG-2018-gt-Date/m-p/66774#M34494</link>
      <description>&lt;P&gt;Informat will work for you. No need to specify an input format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d="06-AUG-2018";

d1="02-JAN-2016";

d2="08-DEC-1998";


x=informat(d);

x1=informat(d1);

x2 = informat(d2);

show(x, x1, x2);

/*:

x = 06Aug2018;
x1 = 02Jan2016;
x2 = 08Dec1998;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Aug 2018 21:31:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-into-dates-Example-06-AUG-2018-gt-Date/m-p/66774#M34494</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2018-08-06T21:31:56Z</dc:date>
    </item>
  </channel>
</rss>

