<?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....('20210228240000' ----&amp;gt; 2021-03-01T00:00:00) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450348#M69713</link>
    <description>&lt;P&gt;I agree too, Craige_Hales!&lt;/P&gt;&lt;P&gt;but, I don't control this problem.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Fortunately, this problem only occurs at midnight.&lt;/DIV&gt;&lt;DIV class=""&gt;Anyway~~Thank&amp;nbsp;thanks a lot!&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 11 Jan 2022 00:18:03 GMT</pubDate>
    <dc:creator>stryper24</dc:creator>
    <dc:date>2022-01-11T00:18:03Z</dc:date>
    <item>
      <title>How to convert string....('20210228240000' ----&gt; 2021-03-01T00:00:00)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450020#M69689</link>
      <description>&lt;P&gt;The data should be saved as '20210301000000' but&amp;nbsp;It is stored as '20210228240000' in the SAP.&lt;BR /&gt;I try to use 'substr function', but Problems always occur at the end of the month.&lt;/P&gt;&lt;P&gt;Finally, as '2021-02-29' is returned, an error occurs in JMP if the date does not exist.&lt;/P&gt;&lt;P&gt;Excel recognizes the date automatically...[ = date(2021, 2, 29) ---&amp;gt; 2021-03-01 ]&lt;/P&gt;&lt;P&gt;I think...First, cut '20210228' from the record, and converting the date, and adding 1 day (86400 seconds) ????&lt;/P&gt;&lt;P&gt;Is there an easier function or method?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:08:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450020#M69689</guid>
      <dc:creator>stryper24</dc:creator>
      <dc:date>2023-06-09T18:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert string....('20210228240000' ----&gt; 2021-03-01T00:00:00)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450039#M69690</link>
      <description>&lt;P&gt;I think you should be fine with following process:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Extract date&lt;/LI&gt;&lt;LI&gt;Convert date to seconds&lt;/LI&gt;&lt;LI&gt;Extract hours, minutes, second and convert to seconds&lt;/LI&gt;&lt;LI&gt;Combine date in seconds and time in seconds&lt;/LI&gt;&lt;LI&gt;Convert seconds to desired format&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;One example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str_list = {
	"20210228230000",
	"20210228240000", 
	"20210301200000",
	"20210301240000"
};

dates = Transform Each({str}, str_list,
	y = Num(Left(str, 4));
	m = Num(Substr(str, 5, 2));
	d = Num(Substr(str, 7, 2));

	hh = Num(Substr(str, 9, 2));
	mm = Num(Substr(str, 11, 2));
	ss = Num(Substr(str, 13, 2));

	date_time = Date MDY(m, d, y) + In Hours(hh) + In Minutes(mm) + ss;

	 MDYHMS(date_time);
);&lt;BR /&gt;//{"02.28.2021 23:00:00", "03.01.2021 0:00:00", "03.01.2021 20:00:00", "03.02.2021 0:00:00"}&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 09:27:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450039#M69690</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-01-10T09:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert string....('20210228240000' ----&gt; 2021-03-01T00:00:00)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450107#M69697</link>
      <description>&lt;P&gt;I think &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; is correct, but test carefully around the edges. Some of the worst bugs I ever dealt with had to do with times. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The worst one only happened before 10AM, but we didn't know that until someone came in early enough to catch it! (Leading blank at 9AM.)&lt;/LI&gt;
&lt;LI&gt;Or maybe it was the one that only happened during the last few seconds of each hour. Similar computation as suggested above, but done badly.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really like how my auto insurance policy starts at 12:01AM to remove the ambiguity...&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 13:30:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450107#M69697</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-01-10T13:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert string....('20210228240000' ----&gt; 2021-03-01T00:00:00)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450347#M69712</link>
      <description>&lt;P&gt;&amp;nbsp;Thank you~jthi~~:)&lt;/P&gt;&lt;P&gt;I solved the problem by applying this.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 00:09:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450347#M69712</guid>
      <dc:creator>stryper24</dc:creator>
      <dc:date>2022-01-11T00:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert string....('20210228240000' ----&gt; 2021-03-01T00:00:00)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450348#M69713</link>
      <description>&lt;P&gt;I agree too, Craige_Hales!&lt;/P&gt;&lt;P&gt;but, I don't control this problem.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Fortunately, this problem only occurs at midnight.&lt;/DIV&gt;&lt;DIV class=""&gt;Anyway~~Thank&amp;nbsp;thanks a lot!&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Jan 2022 00:18:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-string-20210228240000-gt-2021-03-01T00-00-00/m-p/450348#M69713</guid>
      <dc:creator>stryper24</dc:creator>
      <dc:date>2022-01-11T00:18:03Z</dc:date>
    </item>
  </channel>
</rss>

