<?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: Calculating delta time in a CP in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335939#M63616</link>
    <description>Oh, by the way:&lt;BR /&gt;&lt;BR /&gt;"today-7-00:00" is not a delta time - it is a 'combination time'.&lt;BR /&gt;&lt;BR /&gt;$ write sys$output f$time()," ",f$cvtime("today-7-00:00","absolute")&lt;BR /&gt;20-JUL-2004 10:00:37.85 13-JUL-2004 00:00:00.00&lt;BR /&gt;&lt;BR /&gt;"-7-00:00" is not a delta time, either - it is still a combination time meaning 'now - 7 days'.&lt;BR /&gt;&lt;BR /&gt;$ write sys$output f$time()," ",f$cvtime("-7-00:00","absolute")&lt;BR /&gt;20-JUL-2004 10:00:41.08 13-JUL-2004 10:00:41.08&lt;BR /&gt;$</description>
    <pubDate>Tue, 20 Jul 2004 03:00:00 GMT</pubDate>
    <dc:creator>Uwe Zessin</dc:creator>
    <dc:date>2004-07-20T03:00:00Z</dc:date>
    <item>
      <title>Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335935#M63612</link>
      <description>Hello all.&lt;BR /&gt;&lt;BR /&gt;Can you give me an idea on how to calculate a delta time in order to use it in a delete/before command, so it will delete files older than X days?&lt;BR /&gt;I can get the current time using f$time() lexical, but what next?</description>
      <pubDate>Tue, 20 Jul 2004 02:11:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335935#M63612</guid>
      <dc:creator>Alon Jacob</dc:creator>
      <dc:date>2004-07-20T02:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335936#M63613</link>
      <description>Alon,&lt;BR /&gt;&lt;BR /&gt;How about&lt;BR /&gt;&lt;BR /&gt;$ delete file.type;/created/before=today-7-00:00&lt;BR /&gt;&lt;BR /&gt;to delete files older than 7 days?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 20 Jul 2004 02:24:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335936#M63613</guid>
      <dc:creator>David B Sneddon</dc:creator>
      <dc:date>2004-07-20T02:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335937#M63614</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;To compute the same date you can use the lexical function f$cvtime.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ date = f$cvtime("today-7-00:00","ABSOLUTE")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Tue, 20 Jul 2004 02:33:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335937#M63614</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2004-07-20T02:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335938#M63615</link>
      <description>David.&lt;BR /&gt;&lt;BR /&gt;It works like a charm.&lt;BR /&gt;Thanks a-lot.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Alon.</description>
      <pubDate>Tue, 20 Jul 2004 02:37:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335938#M63615</guid>
      <dc:creator>Alon Jacob</dc:creator>
      <dc:date>2004-07-20T02:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335939#M63616</link>
      <description>Oh, by the way:&lt;BR /&gt;&lt;BR /&gt;"today-7-00:00" is not a delta time - it is a 'combination time'.&lt;BR /&gt;&lt;BR /&gt;$ write sys$output f$time()," ",f$cvtime("today-7-00:00","absolute")&lt;BR /&gt;20-JUL-2004 10:00:37.85 13-JUL-2004 00:00:00.00&lt;BR /&gt;&lt;BR /&gt;"-7-00:00" is not a delta time, either - it is still a combination time meaning 'now - 7 days'.&lt;BR /&gt;&lt;BR /&gt;$ write sys$output f$time()," ",f$cvtime("-7-00:00","absolute")&lt;BR /&gt;20-JUL-2004 10:00:41.08 13-JUL-2004 10:00:41.08&lt;BR /&gt;$</description>
      <pubDate>Tue, 20 Jul 2004 03:00:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335939#M63616</guid>
      <dc:creator>Uwe Zessin</dc:creator>
      <dc:date>2004-07-20T03:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335940#M63617</link>
      <description>Alon,&lt;BR /&gt;&lt;BR /&gt;  As pointed out, a combination time will do what you want.&lt;BR /&gt;&lt;BR /&gt;  But for those interested in "true" delta times, DCL is missing the ability to find the difference between two absolute times. &lt;BR /&gt;&lt;BR /&gt;  No promises, but I think delta time calculations in DCL have been implemented for an upcoming version.&lt;BR /&gt;&lt;BR /&gt;  In the mean time, you can use combination times to calculate the difference between two delta times, T0 and T1, by successive approximation. The idea is to find time D such that T0+D = T1. Unfortunately because of the "key space" of times, a true binary search isn't worth the effort. Instead this algorithm works its way down the fields. Being an iterative, it's not exceptionally fast. Maximum difference is 10,000 days (~27 years). &lt;BR /&gt;&lt;BR /&gt;  You could always write a program to do this. I'm not sure if the cost of an image activation is greater than all that looping.&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jul 2004 16:39:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335940#M63617</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2004-07-21T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335941#M63618</link>
      <description>same file as before but this time attached as ".TXT" not ".COM" to help Windows&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Jul 2004 18:16:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335941#M63618</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2004-07-21T18:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating delta time in a CP</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335942#M63619</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;to quote Guy Peleg from comp.os.vms&lt;BR /&gt;&lt;BR /&gt;In the technical update day in the Netherlands it was mentioned that it&lt;BR /&gt;is hard to do delta time calculations.&lt;BR /&gt;In VMS V7.3-2 we added new lexical function F$DELTA_TIME. See the&lt;BR /&gt;following example:&lt;BR /&gt;&lt;BR /&gt;BLUSKY&amp;gt; a=f$time()&lt;BR /&gt;BLUSKY&amp;gt; b=f$time()&lt;BR /&gt;BLUSKY&amp;gt; sh sym a&lt;BR /&gt;  A = " 3-OCT-2003 17:39:58.54"&lt;BR /&gt;BLUSKY&amp;gt; sh sym b&lt;BR /&gt;  B = " 3-OCT-2003 17:40:23.22"&lt;BR /&gt;BLUSKY&amp;gt; write sys$output f$delta(a,b)&lt;BR /&gt;   0 00:00:24.68&lt;BR /&gt;&lt;BR /&gt;hp has it now(TM), John ;-)&lt;BR /&gt;&lt;BR /&gt;Greetings, Martin</description>
      <pubDate>Wed, 21 Jul 2004 20:14:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/calculating-delta-time-in-a-cp/m-p/3335942#M63619</guid>
      <dc:creator>Martin P.J. Zinser</dc:creator>
      <dc:date>2004-07-21T20:14:09Z</dc:date>
    </item>
  </channel>
</rss>

