<?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 format conversion in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5325645#M642014</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert date field of one command output to a different format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# /usr/lbin/getprpw -m slogint test&lt;BR /&gt;slogint=Mon Nov 22 08:31:51 2010&lt;BR /&gt;﻿&lt;/P&gt;&lt;P&gt;I want to convert the date format in to a different variable in a script to slogintt=11/22/2010&lt;/P&gt;&lt;P&gt;How can i do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manoj K&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2011 12:01:25 GMT</pubDate>
    <dc:creator>ManojK_1</dc:creator>
    <dc:date>2011-09-08T12:01:25Z</dc:date>
    <item>
      <title>Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5325645#M642014</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert date field of one command output to a different format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# /usr/lbin/getprpw -m slogint test&lt;BR /&gt;slogint=Mon Nov 22 08:31:51 2010&lt;BR /&gt;﻿&lt;/P&gt;&lt;P&gt;I want to convert the date format in to a different variable in a script to slogintt=11/22/2010&lt;/P&gt;&lt;P&gt;How can i do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manoj K&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2011 12:01:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5325645#M642014</guid>
      <dc:creator>ManojK_1</dc:creator>
      <dc:date>2011-09-08T12:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5325655#M642015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1071628"&gt;@ManojK_1&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert date field of one command output to a different format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# /usr/lbin/getprpw -m slogint test&lt;BR /&gt;slogint=Mon Nov 22 08:31:51 2010&lt;BR /&gt;﻿&lt;/P&gt;&lt;P&gt;I want to convert the date format in to a different variable in a script to slogintt=11/22/2010&lt;/P&gt;&lt;P&gt;How can i do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Manoj K&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the format of the output you want to convert is "WEEKDAY MONTH DAY TIME YEAR" as you have shown, then a simple shell script to snip ('cut') the necessary fields and rearrange them is all you need.&amp;nbsp; A simple array of MONTH names can be defined and indexed to convert the integer MONTH to its name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2011 12:05:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5325655#M642015</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-09-08T12:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5326959#M642016</link>
      <description>&lt;P&gt;Whatever method you choose to convert any format to another with dates, &lt;STRONG&gt;please&lt;/STRONG&gt; consider &lt;STRONG&gt;not&lt;/STRONG&gt;&amp;nbsp;using the stupid US date sustem unless for documentation only. When exchanging dates, the US MM/DD/YYYY is almost imposible to unambiguously do caculations on.&lt;/P&gt;&lt;P&gt;When exchanging dates, use &lt;A target="_blank" href="http://en.wikipedia.org/wiki/ISO_8601"&gt;ISO 8601&lt;/A&gt;&amp;nbsp;YYYY-MM-DD optionally with time&amp;nbsp;&lt;/P&gt;&lt;P&gt;In speech and written text, it is fine to use any style you like, as long as you know the audience, but when communicating beyond national borders you'd have to think about this and how many problems you impose on the receivers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Living in the Netherlands I realy hate MM/DD/YYYY and the default "Letter" paper format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 10:14:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5326959#M642016</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2011-09-09T10:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5326999#M642017</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/862084"&gt;@H.Merijn Brand&lt;/a&gt; (procura wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When exchanging dates, use &lt;A target="_blank" href="http://en.wikipedia.org/wiki/ISO_8601"&gt;ISO 8601&lt;/A&gt;&amp;nbsp;YYYY-MM-DD optionally with time&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As a convert to this presentation format in logs, particularly, adopting this format makes sorting date stamps easier and avoids the ambiguity of wondering whether "01/11" is MMDD or DDMM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 10:50:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5326999#M642017</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-09-09T10:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5327051#M642018</link>
      <description>&lt;P&gt;&amp;gt;please consider not using the stupid US date system﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exactly.&amp;nbsp; I don't feel so bad because ISO 8601﻿ is also better than the stupid UK (European) system too.&amp;nbsp; ;-)&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 11:42:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5327051#M642018</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-09T11:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5327127#M642019</link>
      <description>&lt;P&gt;We seem to agree on this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our company we even take this to the databases. We never ever use date or time (stamp) types, but plain numerics (YYYYMMDD and HHMMSS), which makes it extremely easy to sort or select with ranges.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even with dates that allow "unknown" values for day (and month) - as per law - this approach stands strong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;select * from foo where d_start between 19200100 and 19370631&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is legal :) The fact that we can - without annoying and unpredictable conversions - now exchange data between Oracle, Unify, PostgreSQL, MySQL, MariaDB, SQLite and CSV weighs up to the fact that internal calculation support (add so many days) is not available. I really don't care that reporting tools have to write their own dat checkers now. The law tells us that 19611200 is a legal date of birth (somewhere in December 1961), as not all birth certificates actually have a day specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date representation (from date/time typed fields) in databases is unprediactable &amp;nbsp;as it may change based on localisation of the system, the database, the schema, the table, the session, the user settings or even a local environment variable. Fine when making reports for print, but completely useless when exchanging data. The worst in this world is Microsoft Excel: if it looks like a (US) date, it is converted to (the wrong) date, even when written as YYYYMMDD or "YYYYMMDD" (with quotes). Worse: it depends on how you open the data file in how wrong things get converted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To show where trouble starts, here is what different formats are by default supported on my box for the different locales:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Date format: %-d.%-m.%Y
  cs_CZ, cs_CZ.utf8
Date format: %A %d %B %Y
  ar_IN, ar_IN.utf8, en_BE, en_BE.utf8, en_BE@euro, en_IN, en_IN.utf8,
  ml_IN, ml_IN.utf8, ta_IN, ta_IN.utf8
Date format: %A %d %b %Y
  bn_BD, bn_BD.utf8, bn_IN, bn_IN.utf8, gu_IN, hi_IN, hi_IN.utf8,
  hne_IN, kn_IN, ks_IN, ks_IN@devanagari, mai_IN, mr_IN, mr_IN.utf8,
  ms_MY, ms_MY.utf8, ne_NP, ne_NP.utf8, pa_IN, pa_IN.utf8, sa_IN,
  sd_IN, sd_IN@devanagari
Date format: %A %d,%B,%Y
  en_SG, en_SG.utf8
Date format: %A %e %B %Y
  ar_SA, ar_SA.utf8
Date format: %A, %B %d, %Y
  en_HK, en_HK.utf8
Date format: %A, %d %B, %Y
  en_PH, en_PH.utf8
Date format: %A, %d ta %b, %Y
  mt_MT, mt_MT.utf8
Date format: %A, %d. %B %Y.
  sh_YU, sh_YU.utf8
Date format: %B %d %A %Y
  te_IN, te_IN.utf8
Date format: %F
  nan_TW@latin
Date format: %OC%Oy %b %Od %A
  my_MM
Date format: %Od-%Om-%Oy
  or_IN
Date format: %Oy/%Om/%Od
  fa_IR, fa_IR.utf8
Date format: %Y-%b-%d
  sq_AL, sq_AL.utf8
Date format: %Y-%m-%d
  csb_PL, de_AT, de_AT.utf8, de_AT@euro, de_BE, de_BE.utf8,
  de_BE@euro, de_LU, de_LU.utf8, de_LU@euro, en_DK, en_DK.utf8, fr_CA,
  fr_CA.utf8, hu_HU, hu_HU.utf8, se_NO, se_NO.utf8, si_LK, sv_SE,
  sv_SE.iso885915, sv_SE.utf8, ug_CN
Date format: %Y.%m.%d
  lt_LT, lt_LT.utf8, mn_MN, mn_MN.utf8
Date format: %Y.%m.%d.
  lv_LV, lv_LV.utf8
Date format: %Y�N%m��%d��
  ja_JP.sjis
Date format: %Y�~%m��%d�� %A
  zh_HK
Date format: %Y�� %m�� %d�
  ko_KR.euckr
Date format: %Y�%m�%d�
  zh_CN, zh_CN.gb18030, zh_CN.gbk, zh_SG, zh_SG.gbk
Date format: %Yǯ%m��%d�
  ja_JP.eucjp
Date format: %Y年%m月%d日
  ja_JP.utf8, zh_CN.utf8, zh_SG.utf8
Date format: %Y年%m月%d日 %A
  zh_HK.utf8
Date format: %Y년 %m월 %d일
  ko_KR.utf8
Date format: %a %e.%b %Y
  is_IS, is_IS.utf8
Date format: %a, %Y.eko %bren %da
  eu_ES, eu_ES.utf8, eu_ES@euro
Date format: %d %b %Y
  kl_GL, kl_GL.utf8
Date format: %d %b, %Y
  ar_AE, ar_AE.utf8, ar_BH, ar_BH.utf8, ar_DZ, ar_DZ.utf8, ar_EG,
  ar_EG.utf8, ar_IQ, ar_IQ.utf8, ar_JO, ar_JO.utf8, ar_KW, ar_KW.utf8,
  ar_LB, ar_LB.utf8, ar_LY, ar_LY.utf8, ar_MA, ar_MA.utf8, ar_OM,
  ar_OM.utf8, ar_QA, ar_QA.utf8, ar_SD, ar_SD.utf8, ar_SY, ar_SY.utf8,
  ar_TN, ar_TN.utf8, ar_YE, ar_YE.utf8
Date format: %d-%m-%Y
  da_DK, da_DK.utf8, pt_BR, pt_BR.utf8, pt_PT, pt_PT.utf8, pt_PT@euro,
  tr_CY, tr_CY.utf8, tr_TR, tr_TR.utf8
Date format: %d-%m-%y
  fy_NL, nl_AW, nl_BE, nl_BE.utf8, nl_BE@euro, nl_NL, nl_NL.utf8,
  nl_NL@euro, pap_AN
Date format: %d. %b %Y
  nb_NO, nb_NO.utf8, nn_NO, nn_NO.utf8, no_NO, no_NO.utf8
Date format: %d. %m. %Y
  sl_SI, sl_SI.utf8
Date format: %d. %m. %y
  fr_CH, fr_CH.utf8, fur_IT, it_CH, it_CH.utf8, sc_IT
Date format: %d.%m.%Y
  aa_DJ, aa_DJ.utf8, az_AZ.utf8, be_BY, be_BY.utf8, be_BY@latin,
  ber_DZ, ber_MA, br_FR, br_FR.utf8, br_FR@euro, bs_BA, bs_BA.utf8,
  crh_UA, de_CH, de_CH.utf8, de_DE, de_DE.utf8, de_DE@euro, et_EE,
  et_EE.iso885915, et_EE.utf8, fi_FI, fi_FI.utf8, fi_FI@euro, fr_LU,
  fr_LU.utf8, fr_LU@euro, fy_DE, hr_HR, hr_HR.utf8, hsb_DE,
  hsb_DE.utf8, kk_KZ, kk_KZ.utf8, ky_KG, li_BE, li_NL, mg_MG,
  mg_MG.utf8, mk_MK, mk_MK.utf8, nds_DE, nds_NL, oc_FR, oc_FR.utf8,
  pl_PL, pl_PL.utf8, ro_RO, ro_RO.utf8, ru_RU, ru_RU.koi8r,
  ru_RU.utf8, ru_UA, ru_UA.utf8, rw_RW, sk_SK, sk_SK.utf8, so_DJ,
  so_DJ.utf8, sv_FI, sv_FI.utf8, sv_FI@euro, tg_TJ, tg_TJ.utf8, tk_TM,
  tt_RU.utf8, tt_RU@iqtelif.UTF-8, wo_SN
Date format: %d.%m.%Y.
  sr_ME, sr_RS, sr_RS@latin
Date format: %d.%m.%y
  cy_GB, cy_GB.utf8, ga_IE, ga_IE.utf8, ga_IE@euro, uk_UA, uk_UA.utf8
Date format: %d/%m-%Y
  fo_FO, fo_FO.utf8
Date format: %d/%m/%Ey
  lo_LA, th_TH, th_TH.utf8
Date format: %d/%m/%Y
  aa_ER, aa_ER.utf8, aa_ER@saaho, aa_ET, aa_ET.utf8, af_ZA,
  af_ZA.utf8, am_ET, am_ET.utf8, byn_ER, byn_ER.utf8, dv_MV, el_CY,
  el_CY.utf8, el_GR, el_GR.utf8, en_BW, en_BW.utf8, en_NG, en_ZA,
  en_ZA.utf8, en_ZW, en_ZW.utf8, fr_FR, fr_FR.utf8, fr_FR@euro,
  gez_ER, gez_ER@abegede, gez_ET, gez_ET@abegede, it_IT, it_IT.utf8,
  it_IT@euro, ku_TR, ku_TR.utf8, nr_ZA, nso_ZA, om_ET, om_ET.utf8,
  om_KE, om_KE.utf8, pa_PK, sid_ET, sid_ET.utf8, so_ET, so_ET.utf8,
  so_KE, so_KE.utf8, so_SO, so_SO.utf8, ss_ZA, st_ZA, st_ZA.utf8,
  ti_ER, ti_ER.utf8, ti_ET, ti_ET.utf8, tig_ER, tig_ER.utf8, tn_ZA,
  ts_ZA, ur_PK, ur_PK.utf8, ve_ZA, vi_VN, vi_VN.tcvn, wa_BE,
  wa_BE.utf8, wa_BE@euro, xh_ZA, xh_ZA.utf8, zu_ZA, zu_ZA.utf8
Date format: %d/%m/%y
  an_ES, an_ES.utf8, ast_ES, ast_ES.utf8, ca_AD, ca_AD.utf8, ca_ES,
  ca_ES.utf8, ca_ES@euro, ca_FR, ca_FR.utf8, ca_IT, ca_IT.utf8, en_AG,
  en_AU, en_AU.utf8, en_CA, en_CA.utf8, en_GB, en_GB.iso885915,
  en_GB.utf8, en_IE, en_IE.utf8, en_IE@euro, en_NZ, en_NZ.utf8, es_AR,
  es_AR.utf8, es_BO, es_BO.utf8, es_CL, es_CL.utf8, es_CO, es_CO.utf8,
  es_CR, es_CR.utf8, es_DO, es_DO.utf8, es_EC, es_EC.utf8, es_ES,
  es_ES.utf8, es_ES@euro, es_GT, es_GT.utf8, es_HN, es_HN.utf8, es_MX,
  es_MX.utf8, es_NI, es_NI.utf8, es_PA, es_PA.utf8, es_PE, es_PE.utf8,
  es_PR, es_PR.utf8, es_PY, es_PY.utf8, es_SV, es_SV.utf8, es_US,
  es_US.utf8, es_UY, es_UY.utf8, es_VE, es_VE.utf8, fr_BE, fr_BE.utf8,
  fr_BE@euro, gd_GB, gd_GB.utf8, gl_ES, gl_ES.utf8, gl_ES@euro, gv_GB,
  gv_GB.utf8, ha_NG, he_IL, he_IL.utf8, ht_HT, id_ID, id_ID.utf8,
  ig_NG, ik_CA, iw_IL, iw_IL.utf8, kw_GB, kw_GB.utf8, lg_UG,
  lg_UG.utf8, mi_NZ, mi_NZ.utf8, shs_CA, uz_UZ, uz_UZ@cyrillic, yi_US,
  yi_US.utf8, yo_NG
Date format: %e %B %Y
  km_KH
Date format: %e-%m-%Y
  as_IN.utf8
Date format: %e.%m.%Y
  bg_BG, bg_BG.utf8
Date format: %m/%d/%Y
  en_US, en_US.UTF-8, en_US.iso885915, en_US.utf8, ka_GE, ka_GE.utf8
Date format: %m/%d/%y
  C, POSIX, fil_PH, hy_AM, hy_AM.armscii8, iu_CA, ja_JP.shiftjisx0213,
  tl_PH, tl_PH.utf8
Date format: �褸%Y�~%m��%d��
  zh_TW
Date format: ��%Yȡ%m�%d�
  zh_TW.euctw
Date format: د %Y د %B %e
  ps_AF
Date format: པསྱི་ལོ%yཟལ%mཚེས%d
  bo_CN, bo_IN, dz_BT
Date format: 西元%Y年%m月%d日
  zh_TW.utf8&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Feel my pain? Feel why I do not like NLS, locales and anything related when doing conversions or data-exchange?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 12:37:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5327127#M642019</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2011-09-09T12:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5327217#M642020</link>
      <description>&lt;P&gt;Since your question is a generic one, it's hard to give any specific advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Find out if you can request the output in different formats. If you can, find the format that is easiest for you to parse.&lt;/LI&gt;&lt;LI&gt;Write a script that parses the input and then converts it to the form you require.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;There are probably almost an infinite number of ways to solve each problem of this type.&lt;/P&gt;&lt;P&gt;In your example, you might do something like this:&lt;/P&gt;&lt;PRE&gt;#!/bin/sh

USERNAME=test
&lt;BR /&gt;# This function takes the entire output of "getprpw -m slogint" as arguments. 
convslogint() {&lt;BR /&gt;MONTHNAME=$2
DAY=$3
YEAR=$5

case "$MONTHNAME" in
  Jan)
    MONTH="01"
    ;;
  Feb)
    MONTH="02"
    ;;
  Mar)
    MONTH="03"
    ;;
  Apr)
    MONTH="04"
    ;;
  May)
    MONTH="05"
    ;;
  Jun)
    MONTH="06"
    ;;
  Jul)
    MONTH="07"
    ;;
  Aug)
    MONTH="08"
    ;;
  Sep)
    MONTH="09"
    ;;
  Oct)
    MONTH="10"
    ;;
  Nov)
    MONTH="11"
    ;;
  Dec)
    MONTH="12"
    ;;
  *)
    echo "ERROR: unknown month name $MONTHNAME" &amp;gt;&amp;amp;2
    return 1
    ;;
esac

echo "$MONTH/$DAY/$YEAR" # FIXME: not an ISO 8601 time format! 
return 0
}

# example function call

slogintt=$(convslogint $(/usr/lbin/getprpw -m slogint $USERNAME))
echo "slogintt=$slogintt"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 13:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/date-format-conversion/m-p/5327217#M642020</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-09-09T13:59:33Z</dc:date>
    </item>
  </channel>
</rss>

