<?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: date string comparison ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867810#M97704</link>
    <description>not bad - but need it to include the time aswell&lt;BR /&gt;and give answer in minutes !!&lt;BR /&gt;pushing my luck ?</description>
    <pubDate>Thu, 19 Dec 2002 16:53:54 GMT</pubDate>
    <dc:creator>Ian McClement_1</dc:creator>
    <dc:date>2002-12-19T16:53:54Z</dc:date>
    <item>
      <title>date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867806#M97700</link>
      <description>Hi&lt;BR /&gt;I have two strings with date/times in them&lt;BR /&gt;eg. "12:25 12:00" and "12:26 11:00"&lt;BR /&gt;is there some form of unix command that will compare two date strings (not necessarily in above format) and give the time between them ?&lt;BR /&gt;&lt;BR /&gt;Any help appreciated&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Ian</description>
      <pubDate>Thu, 19 Dec 2002 15:20:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867806#M97700</guid>
      <dc:creator>Ian McClement_1</dc:creator>
      <dc:date>2002-12-19T15:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867807#M97701</link>
      <description>Ian,&lt;BR /&gt;&lt;BR /&gt;Search the forums (using the search button on the top left of this page) for Clay's caljd.sh script.  It's a wonderful thing and just what you're looking for.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 19 Dec 2002 15:22:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867807#M97701</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-12-19T15:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867808#M97702</link>
      <description>You can find a copy in this post:&lt;BR /&gt; &lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 19 Dec 2002 15:25:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867808#M97702</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-12-19T15:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867809#M97703</link>
      <description>Sorry Ian, I thought Clay's date hammer would handle that but none of my searches turn up anything of the sort, which makes sense because it deals with Julian dates.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 19 Dec 2002 16:49:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867809#M97703</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-12-19T16:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867810#M97704</link>
      <description>not bad - but need it to include the time aswell&lt;BR /&gt;and give answer in minutes !!&lt;BR /&gt;pushing my luck ?</description>
      <pubDate>Thu, 19 Dec 2002 16:53:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867810#M97704</guid>
      <dc:creator>Ian McClement_1</dc:creator>
      <dc:date>2002-12-19T16:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867811#M97705</link>
      <description>Hi Ian,&lt;BR /&gt;if nothing else works, you can try the attached, rather slow script. It can return the number of  seconds elapsed since 00:00 Jan 1 of a specified year - and a specified date/time. The script takes seven parameters of which the first is the year on whose midnight Jan 1 the count starts. The remaining six parameters are the year, month, day, hour, minute, and seconds to count  up to.&lt;BR /&gt;It may sound obscure, an example: show the number of seconds since 00:00 Jan 1 of 2002 and December 25 12:25 same year:&lt;BR /&gt;&lt;BR /&gt;# ./return_seconds.sh 2002 2002 12 25 12 00 00&lt;BR /&gt;30974400&lt;BR /&gt;&lt;BR /&gt;Another example:&lt;BR /&gt;# ./return_seconds.sh 2002 2002 12 26 11 00 00&lt;BR /&gt;31057200&lt;BR /&gt;&lt;BR /&gt;The difference in seconds:&lt;BR /&gt;# echo 31057200 - 30974400|bc&lt;BR /&gt;82800&lt;BR /&gt;&lt;BR /&gt;And turned into minutes:&lt;BR /&gt;# echo 82800 \/ 60|bc&lt;BR /&gt;1380&lt;BR /&gt;&lt;BR /&gt;Is that what you want?&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Dec 2002 18:23:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867811#M97705</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2002-12-19T18:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: date string comparison ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867812#M97706</link>
      <description>There is always perl.&lt;BR /&gt;You can do the math on the seconds since epoch then convert back to local time.</description>
      <pubDate>Sat, 21 Dec 2002 00:23:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-string-comparison/m-p/2867812#M97706</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2002-12-21T00:23:23Z</dc:date>
    </item>
  </channel>
</rss>

