<?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: Combining Date Column and Time Column to Create Timestamp in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461930#M70680</link>
    <description>&lt;P&gt;I would run the 2 scripts below to make sure the Date values only point to the start of the day you are specify.&amp;nbsp; Just up to the start of the day 00:00:00.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
	:date = Date MDY(
		Month( :date ),
		Day( :date ),
		Year( :date )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And with a slightly different approach, fix the :Time column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
	:time = Hour( :time ) * 3600 
	+ Minute( :time ) * 60
	+ Second( :time )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;These 2 scripts will insure that Date has no times in the data, and the second one has no dates in &lt;SPAN class="lia-emoticons-autosuggestions"&gt;&lt;SPAN class="lia-emoticons-search-term"&gt;:Time&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 20:16:42 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-02-17T20:16:42Z</dc:date>
    <item>
      <title>Combining Date Column and Time Column to Create Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461658#M70658</link>
      <description>&lt;P&gt;For a data table with a date column and a time column, I create a new column that uses the formula Date + Time to create a timestamp.&amp;nbsp; However the formula seems to work inconsistently where some of the timestamps result in being 4 YEARS previous than what they should be.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Time&lt;/TD&gt;&lt;TD&gt;Timestamp (formula)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2021 - 10 - 01&lt;/TD&gt;&lt;TD&gt;12:05 AM&lt;/TD&gt;&lt;TD&gt;10/01/2021 12:05 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2021 - 10 - 23&lt;/TD&gt;&lt;TD&gt;6:59 PM&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;10/23/2017 6:59 PM&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2021 - 11 - 07&lt;/TD&gt;&lt;TD&gt;7:45 PM&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;11/07/2017 7:45 PM&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to generate a timestamp that avoids whatever causes this issue?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:44:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461658#M70658</guid>
      <dc:creator>user8421</dc:creator>
      <dc:date>2023-06-10T23:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Date Column and Time Column to Create Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461680#M70659</link>
      <description>&lt;P&gt;Assuming that your Date column and your Time column are JMP date/time values, my suggestion is that you need to change the display format for your 2 columns to display both date and time to see if the Time column contains date values&amp;nbsp; In this example, Column 6 and Column 7 display the same time values,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1645062309651.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40065iC0AE642A020147DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1645062309651.png" alt="txnelson_0-1645062309651.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;however, when one examines the actual numeric values, they are completely different.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1645062620851.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40066iA4F18D700849C6BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1645062620851.png" alt="txnelson_1-1645062620851.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Column 6 actually contains the date component , so what I am guessing is that in your time value, there are additional date related values&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_2-1645062823276.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40067i2D40BFD700A52569/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_2-1645062823276.png" alt="txnelson_2-1645062823276.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 01:53:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461680#M70659</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-02-17T01:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Date Column and Time Column to Create Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461929#M70679</link>
      <description>&lt;P&gt;Thanks for the explanation.&amp;nbsp; When I changed the format of the Time column it showed different dates with one being the 01/01/1994 and the other 12/31/1899.&amp;nbsp; The raw data that is pulled into JMP lists the time only, so I am unclear how the date is "assigned" to the times.&amp;nbsp; How can I address the discrepancy, so that the dates are consistent in the time columns?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 19:55:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461929#M70679</guid>
      <dc:creator>user8421</dc:creator>
      <dc:date>2022-02-17T19:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Date Column and Time Column to Create Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461930#M70680</link>
      <description>&lt;P&gt;I would run the 2 scripts below to make sure the Date values only point to the start of the day you are specify.&amp;nbsp; Just up to the start of the day 00:00:00.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
	:date = Date MDY(
		Month( :date ),
		Day( :date ),
		Year( :date )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And with a slightly different approach, fix the :Time column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
	:time = Hour( :time ) * 3600 
	+ Minute( :time ) * 60
	+ Second( :time )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;These 2 scripts will insure that Date has no times in the data, and the second one has no dates in &lt;SPAN class="lia-emoticons-autosuggestions"&gt;&lt;SPAN class="lia-emoticons-search-term"&gt;:Time&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 20:16:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combining-Date-Column-and-Time-Column-to-Create-Timestamp/m-p/461930#M70680</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-02-17T20:16:42Z</dc:date>
    </item>
  </channel>
</rss>

