<?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 conversion in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343888#M191283</link>
    <description>And for *all* other formats (including those of your example):&lt;BR /&gt;&lt;BR /&gt;# perl -wMDate::Manip -e'$dt=UnixDate($string,"%d-%b-%Y");&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Thu, 29 Jul 2004 00:42:29 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-07-29T00:42:29Z</dc:date>
    <item>
      <title>Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343881#M191276</link>
      <description>HI :&lt;BR /&gt;I have eg:&lt;BR /&gt;01Jan04&lt;BR /&gt;24Jun04 &lt;BR /&gt;how to convert to &lt;BR /&gt;01-Jan-04 &lt;BR /&gt;24-Jun-04 ?&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 28 Jul 2004 16:46:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343881#M191276</guid>
      <dc:creator>Mike_Ca Li</dc:creator>
      <dc:date>2004-07-28T16:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343882#M191277</link>
      <description>Try this:&lt;BR /&gt;&lt;BR /&gt;date %d%b%y</description>
      <pubDate>Wed, 28 Jul 2004 16:51:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343882#M191277</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-07-28T16:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343883#M191278</link>
      <description>#!/usr/bin/sh&lt;BR /&gt;DATE=$1&lt;BR /&gt;DAY=$(echo ${DATE} | cut -c 1-2)&lt;BR /&gt;MONTH=$(echo ${DATE} | cut -c 3-5)&lt;BR /&gt;YEAR=$(echo ${DATE} | cut -c 6-7)&lt;BR /&gt;&lt;BR /&gt;echo "${DAY}-${MONTH}-${YEAR}"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Invoke it as:&lt;BR /&gt;&lt;BR /&gt;# conv_date 01Jan04&lt;BR /&gt;And the output should be:&lt;BR /&gt;01-Jan-04</description>
      <pubDate>Wed, 28 Jul 2004 16:51:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343883#M191278</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-07-28T16:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343884#M191279</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;like&lt;BR /&gt;echo "01Jan04" | awk '{print substr($1,1,2)"-"substr($1,3,3)"-"substr($1,6,2)}'&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jul 2004 16:51:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343884#M191279</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2004-07-28T16:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343885#M191280</link>
      <description>obviously I didn't read the question correctly ... sorry&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jul 2004 16:55:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343885#M191280</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-07-28T16:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343886#M191281</link>
      <description>How about this perl one liner-&lt;BR /&gt; &lt;BR /&gt;perl -p -e 's/(..)(...)(..)/$1-$2-$3/' inpfile &amp;gt;outfile&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 28 Jul 2004 16:56:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343886#M191281</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-07-28T16:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343887#M191282</link>
      <description>&lt;BR /&gt;&lt;BR /&gt; perl -pe 's/(\D+)/-$1-/'   infile &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;Now this of course will only work with the very simple examples you show.&lt;BR /&gt;&lt;BR /&gt;Just for grins,&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Jul 2004 19:19:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343887#M191282</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-07-28T19:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343888#M191283</link>
      <description>And for *all* other formats (including those of your example):&lt;BR /&gt;&lt;BR /&gt;# perl -wMDate::Manip -e'$dt=UnixDate($string,"%d-%b-%Y");&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 29 Jul 2004 00:42:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343888#M191283</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-07-29T00:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343889#M191284</link>
      <description>And for *all* other formats (including those of your example):&lt;BR /&gt;&lt;BR /&gt;# perl -wMDate::Manip -e'$dt=UnixDate($string,"%d-%b-%Y")'&lt;BR /&gt;&lt;BR /&gt;where $string is your date&lt;BR /&gt;if the dates are in a file&lt;BR /&gt;&lt;BR /&gt;# perl -wMDate::Manip -pe'$_=UnixDate($_,"%d-%b-%Y")' file&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 29 Jul 2004 00:43:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343889#M191284</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-07-29T00:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343890#M191285</link>
      <description>hai ,&lt;BR /&gt;&lt;BR /&gt;Use in the following form date "+%d-%h-%y"&lt;BR /&gt;&lt;BR /&gt;#  date "+%d-%h-%y"&lt;BR /&gt;29-Jul-04&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;-Saravanan</description>
      <pubDate>Thu, 29 Jul 2004 01:00:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-conversion/m-p/3343890#M191285</guid>
      <dc:creator>Saravanan_11</dc:creator>
      <dc:date>2004-07-29T01:00:35Z</dc:date>
    </item>
  </channel>
</rss>

