<?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 Changing char date column to numeric date in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750329#M93110</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Attached is a table with a column called StartDate. It is in char format and have excessive '0's at the end of each date. I wish to write a script to change the StartDate column to this format like : 04/12/2024 4:10:09 PM. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Apr 2024 03:42:05 GMT</pubDate>
    <dc:creator>cchueng</dc:creator>
    <dc:date>2024-04-27T03:42:05Z</dc:date>
    <item>
      <title>Changing char date column to numeric date</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750329#M93110</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Attached is a table with a column called StartDate. It is in char format and have excessive '0's at the end of each date. I wish to write a script to change the StartDate column to this format like : 04/12/2024 4:10:09 PM. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 03:42:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750329#M93110</guid>
      <dc:creator>cchueng</dc:creator>
      <dc:date>2024-04-27T03:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Changing char date column to numeric date</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750341#M93111</link>
      <description>&lt;P&gt;Here is a little script that will create a new numeric date/time column converting your StartTime column values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "StartTime2",
	set each value(
		Informat( Word( 1, :StartTime, "+" ), "yyy/mm/ddThh:mm:ss" )
	),
	Format( "m/d/y h:m:s" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1714191846052.png" style="width: 578px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63752i8BE3E7FAEAFFBA7D/image-dimensions/578x321?v=v2" width="578" height="321" role="button" title="txnelson_0-1714191846052.png" alt="txnelson_0-1714191846052.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 04:24:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750341#M93111</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-04-27T04:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing char date column to numeric date</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750343#M93112</link>
      <description>&lt;P&gt;Thank you, this works!&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 05:27:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750343#M93112</guid>
      <dc:creator>cchueng</dc:creator>
      <dc:date>2024-04-27T05:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Changing char date column to numeric date</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750344#M93113</link>
      <description>&lt;P&gt;I wondered about the "T" ...&lt;BR /&gt;&lt;BR /&gt;Actually,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "StartTime2",
	set each value(
		Informat( Word( 1, :StartTime, "+" ), "hello" )
	),
	Format( "m/d/y h:m:s" )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;does the job as well :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;It's the power of Informat: For most cases there is no need to specify the pattern, Informat will detect it on it's own.&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Informat-ParseDate-function-with-time/m-p/736131/highlight/true#M91680" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Informat-ParseDate-function-with-time/m-p/736131/highlight/true#M91680&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Just for some rare cases (like DD.MM.YYYY ) you have to invest some additional effort.&lt;BR /&gt;Either specify the pattern via &lt;FONT face="courier new,courier"&gt;"Format Pattern", your pattern&lt;/FONT&gt; ,&lt;BR /&gt;or via Date Format Writer from the&amp;nbsp;&amp;nbsp;&lt;LI-MESSAGE title="Data Table Tools Add-in" uid="28582" url="https://community.jmp.com/t5/JMP-Add-Ins/Data-Table-Tools-Add-in/m-p/28582#U28582" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;:&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/JMP-On-Air/The-Doctor-Cures-Your-Date-and-Time-Import-Problems/tac-p/735440/highlight/true#M351" target="_blank"&gt;https://community.jmp.com/t5/JMP-On-Air/The-Doctor-Cures-Your-Date-and-Time-Import-Problems/tac-p/735440/highlight/true#M351&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;:)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 08:17:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750344#M93113</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-27T08:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Changing char date column to numeric date</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750452#M93135</link>
      <description>&lt;P&gt;maybe the easiest way:&lt;BR /&gt;open the column properties, and change the data type to numeric, then specify the pattern.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;a) row 13 shows:&lt;BR /&gt;with the pattern &amp;lt;ss&amp;gt; Jmp automatically reads the seconds including the digits after the point.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1714326583055.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63764iC1CB07928590B085/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1714326583055.png" alt="hogi_0-1714326583055.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) The only thing that is not automatically detected is the timezone offset *)&lt;BR /&gt;→ if all values are the same, you can just add " +00:00" - to get it "ignored".&lt;BR /&gt;&lt;BR /&gt;*)&amp;nbsp;&lt;LI-MESSAGE title="Date Format Pattern - additional functionality" uid="736645" url="https://community.jmp.com/t5/JMP-Wish-List/Date-Format-Pattern-additional-functionality/m-p/736645#U736645" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6351935144112w564h540r136" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6351935144112" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6351935144112w564h540r136');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/6351935144112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2024 17:51:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-char-date-column-to-numeric-date/m-p/750452#M93135</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-28T17:51:21Z</dc:date>
    </item>
  </channel>
</rss>

