<?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 How to subtract a fixed duration from Date Time column? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714362#M89767</link>
    <description>&lt;P&gt;I have a data table with entryDate as one of the columns. It is Numeric &amp;amp; Continuous type and has row entries in the following format&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;07/07/2023 08:20:21&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I want to subtract the following an offset from it and get newEntryDate in a new column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;184 days, 14 hours, 14 minutes and 43 seconds&lt;BR /&gt;(or 6 months, 2 days, 14 hours, 14 minutes, 43 seconds)&lt;/P&gt;&lt;P&gt;How to do this in JMP/JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2024 17:01:52 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2024-01-09T17:01:52Z</dc:date>
    <item>
      <title>How to subtract a fixed duration from Date Time column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714362#M89767</link>
      <description>&lt;P&gt;I have a data table with entryDate as one of the columns. It is Numeric &amp;amp; Continuous type and has row entries in the following format&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;07/07/2023 08:20:21&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I want to subtract the following an offset from it and get newEntryDate in a new column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;184 days, 14 hours, 14 minutes and 43 seconds&lt;BR /&gt;(or 6 months, 2 days, 14 hours, 14 minutes, 43 seconds)&lt;/P&gt;&lt;P&gt;How to do this in JMP/JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 17:01:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714362#M89767</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-01-09T17:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to subtract a fixed duration from Date Time column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714379#M89768</link>
      <description>&lt;P&gt;Convert your time to seconds and then you can deduct it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:entryDate - (In Days(184) + In hours(14) + In Minutes(14) + 43)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 17:25:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714379#M89768</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-09T17:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to subtract a fixed duration from Date Time column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714457#M89776</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks. I almost managed it but did not realize that 43 could be subtracted directly I was looking for a &lt;EM&gt;In Seconds ()&lt;/EM&gt; function.&lt;/P&gt;&lt;P&gt;While I am on this topic, how do I get the difference/duration in seconds between&amp;nbsp;&lt;EM&gt;:entryDate&lt;/EM&gt; and &lt;EM&gt;:newEntryDate&lt;/EM&gt; ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 22:26:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714457#M89776</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-01-09T22:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to subtract a fixed duration from Date Time column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714458#M89777</link>
      <description>&lt;P&gt;Dates, times, and datetimes are stored as a number of seconds. So to get the difference between two dates in seconds just subtract one from the other.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want the difference in other units you can use the &lt;A href="https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/date-and-time-functions.shtml#ww2538966" target="_self"&gt;Date Difference()&lt;/A&gt; function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read more:&amp;nbsp;&lt;LI-MESSAGE title="Using dates, times, datetimes and durations in JMP" uid="68689" url="https://community.jmp.com/t5/JMPer-Cable/Using-dates-times-datetimes-and-durations-in-JMP/m-p/68689#U68689" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 22:34:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714458#M89777</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2024-01-09T22:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to subtract a fixed duration from Date Time column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714463#M89778</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp;. OK thanks. How do I convert the date in the format I have in seconds?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 23:07:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714463#M89778</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-01-09T23:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to subtract a fixed duration from Date Time column?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714467#M89779</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;It is Numeric &amp;amp; Continuous type&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If your date column is numeric/continuous as you have specified, then it is already in seconds, behind the scenes as it were.&amp;nbsp; You must have specified a column format of&amp;nbsp;&lt;STRONG&gt;m/d/y h:m:s&lt;/STRONG&gt;.&amp;nbsp; If you want to display seconds, then use a numerical format.&lt;/P&gt;
&lt;P&gt;Here's a table where the first column uses the date format, and the second one uses numeric format:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1704854772212.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60235iC0F708E9CC60A030/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1704854772212.png" alt="pmroz_0-1704854772212.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Test Date", Add Rows( 2 ),
	New Column( "Date Format", Numeric, "Continuous",
		Format( "m/d/y h:m:s", 23, 0 ),
		Input Format( "m/d/y h:m:s", 0 ),
		Set Values( [3771562821, 3771562821] )
	),
	New Column( "Date in Seconds", Numeric, "Continuous", Format( "Best", 12 ),
		Formula( :Date Format )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2024 02:46:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subtract-a-fixed-duration-from-Date-Time-column/m-p/714467#M89779</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2024-01-10T02:46:31Z</dc:date>
    </item>
  </channel>
</rss>

