<?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 date conversion in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605774#M679888</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I need to convert date from this format:&lt;BR /&gt;Tue Mar 23 18:31:08 EET 2010&lt;BR /&gt;in something like this&lt;BR /&gt;07DA0317101F2B00&lt;BR /&gt;07da-year&lt;BR /&gt;03-mounth&lt;BR /&gt;17-day&lt;BR /&gt;10-hour&lt;BR /&gt;1f-min&lt;BR /&gt;2b-sec&lt;BR /&gt;00-decsec&lt;BR /&gt;I tried to do it with this command &lt;BR /&gt;printf "%x" `date "+ %Y %m %d %H %M %S"`&lt;BR /&gt;but the result it's not what I want, it looks like this&lt;BR /&gt;7DA317101F2B&lt;BR /&gt;7da-year&lt;BR /&gt;3-mounth&lt;BR /&gt;17-day&lt;BR /&gt;10-hour&lt;BR /&gt;1f-min&lt;BR /&gt;2b-sec&lt;BR /&gt;Are missing some zerous :)&lt;BR /&gt;There is a way to have all zeros?&lt;BR /&gt;&lt;BR /&gt;server: RP4440&lt;BR /&gt;sw:B 11.11&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;dublonn</description>
    <pubDate>Tue, 23 Mar 2010 15:41:50 GMT</pubDate>
    <dc:creator>dublonn</dc:creator>
    <dc:date>2010-03-23T15:41:50Z</dc:date>
    <item>
      <title>date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605774#M679888</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I need to convert date from this format:&lt;BR /&gt;Tue Mar 23 18:31:08 EET 2010&lt;BR /&gt;in something like this&lt;BR /&gt;07DA0317101F2B00&lt;BR /&gt;07da-year&lt;BR /&gt;03-mounth&lt;BR /&gt;17-day&lt;BR /&gt;10-hour&lt;BR /&gt;1f-min&lt;BR /&gt;2b-sec&lt;BR /&gt;00-decsec&lt;BR /&gt;I tried to do it with this command &lt;BR /&gt;printf "%x" `date "+ %Y %m %d %H %M %S"`&lt;BR /&gt;but the result it's not what I want, it looks like this&lt;BR /&gt;7DA317101F2B&lt;BR /&gt;7da-year&lt;BR /&gt;3-mounth&lt;BR /&gt;17-day&lt;BR /&gt;10-hour&lt;BR /&gt;1f-min&lt;BR /&gt;2b-sec&lt;BR /&gt;Are missing some zerous :)&lt;BR /&gt;There is a way to have all zeros?&lt;BR /&gt;&lt;BR /&gt;server: RP4440&lt;BR /&gt;sw:B 11.11&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;dublonn</description>
      <pubDate>Tue, 23 Mar 2010 15:41:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605774#M679888</guid>
      <dc:creator>dublonn</dc:creator>
      <dc:date>2010-03-23T15:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605775#M679889</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Why not:&lt;BR /&gt;&lt;BR /&gt;# print $(date "+%Y%m%d%H%M%S")&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Mar 2010 15:53:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605775#M679889</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-23T15:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605776#M679890</link>
      <description>hy,&lt;BR /&gt;&lt;BR /&gt;It's work but I need in hexa not in decimal...</description>
      <pubDate>Tue, 23 Mar 2010 15:57:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605776#M679890</guid>
      <dc:creator>dublonn</dc:creator>
      <dc:date>2010-03-23T15:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605777#M679891</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;OK, I see.  How about:&lt;BR /&gt;&lt;BR /&gt;# perl -e '@t=localtime(time);printf "%0x%02x%02x%02x%02x%02x\n",$t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0]'&lt;BR /&gt;7da03170d0c0a&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 23 Mar 2010 16:13:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605777#M679891</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-23T16:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605778#M679892</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;For grins-and-giggles, we can shorten things:&lt;BR /&gt;&lt;BR /&gt;# perl -e '@t=localtime;printf "%03x%02x%02x%02x%02x%02x\n",$t[5]+1900,$t[4]+1,@t[3,2,1,0]'&lt;BR /&gt;&lt;BR /&gt;For that matter, you can convert any Epoch seconds to a hexadecimal number representing the date components.  For me, in the Eastern US, 999,999,999 seconds after the Epoch yielded 0x7d10908152e27 or 20010908214639 (2001-09-08-21:46:39).&lt;BR /&gt;&lt;BR /&gt;# perl -e '@t=localtime(999_999_999);printf "%03x%02x%02x%02x%02x%02x\n",$t[5]+1900,$t[4]+1,@t[3,2,1,0]'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 23 Mar 2010 18:32:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605778#M679892</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-23T18:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605779#M679893</link>
      <description>Hmmm, &lt;BR /&gt;&lt;BR /&gt;dublonn, what problem are you really trying to solve (and why)?&lt;BR /&gt;&lt;BR /&gt;Do you have the time itself as input, or do you have a piece of string in "Day Mon dd hh:mm:ss zon yyyy" format at input?&lt;BR /&gt;&lt;BR /&gt;Frankly I suspect that the problem description is all wrong. &lt;BR /&gt;In my world it makes no sense at all to convert individual date &amp;amp; time components to hexadecimal other than to confuse the romanians (feeble joke).&lt;BR /&gt;&lt;BR /&gt;And where does the deci-seconds component come from?&lt;BR /&gt;&lt;BR /&gt;It wouldn't surprise me if the hex is supposed to be a simple formating of the time since epoch in seconds&lt;BR /&gt;&lt;BR /&gt;&amp;gt;perl -e "$x=time();printf qq(%d %x\n),$x,$x"&lt;BR /&gt;1269403997 4ba9915d&lt;BR /&gt;&lt;BR /&gt;That brings a 14 byte yyyymmddhhmmss (localtime reformatted) through a 10 digit decimal number, down to an 8 character hexadecimal string, utilizing all positions fully.&lt;BR /&gt;&lt;BR /&gt;Your request seems to ask that for example the minute component instead of going from 00-59 (not using 60 - 99) uses 00-4B (not using 4C-FF). Why?&lt;BR /&gt;&lt;BR /&gt;Hope this help clarify a little,&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 03:29:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605779#M679893</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-24T03:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605780#M679894</link>
      <description>Thanks a lot James, your answer was briliant.&lt;BR /&gt;the right command for me is:&lt;BR /&gt;&lt;BR /&gt;perl -e '@t=localtime;printf "%04x%02x%02x%02x%02x%02x%02x\n",$t[5]+1900,$t[4]+1,@t[3,2,1,0]'&lt;BR /&gt;&lt;BR /&gt;the result is : 07da031809170c00&lt;BR /&gt;exactly what I need it.&lt;BR /&gt;&lt;BR /&gt;Mr Heuvel,&lt;BR /&gt;I need date in this format because I have to synconize some eq from the network which support only hexa format and that type of format.&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;dublonn</description>
      <pubDate>Wed, 24 Mar 2010 06:29:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605780#M679894</guid>
      <dc:creator>dublonn</dc:creator>
      <dc:date>2010-03-24T06:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605781#M679895</link>
      <description>dublonn, I'm glad you have what you need, albeit technically not what you asked for.&lt;BR /&gt;Thin input date format was 32 bit- binary where the question asked about a piece of string: From this format Tue Mar 23...&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; I need date in this format because I have to synconize some eq from the network which support only hexa format and that type of format.&lt;BR /&gt;&lt;BR /&gt;Thank you for explaining. &lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Mar 2010 10:38:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/4605781#M679895</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-03-24T10:38:15Z</dc:date>
    </item>
  </channel>
</rss>

