Walter Ericson

Forum Replies Created

Viewing 3 replies – 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: Julian to calendar date conversion #58084
    Walter Ericson
    Participant

      Rob,

      I use a function in Unix AIX 5.2 (korn shell) to get the last day of the month:

      last_day_of_month()

      {

      /usr/bin/cal $1 $2 | /usr/bin/awk ‘{if ($NF) Last=$NF}

      END{printf(“%sn”,Last);}’;

      }

      Sample useage (in korn shell script):

      YESTERDAY=`last_day_of_month $LASTMONTH $YEAR`;

      You may have to find cal and awk on your system!!

      cal is a calender call, the $1 is month value and $2 is a year.  

      The awk command gets the last field with a value from the calender display.

      You will also have to put in conditions for first of the year.

      In tcl you can use something like

      hcitcl>clock format [clock scan “today -1 day”] -format %Y%m%d

      20051228

      The clock scan command will parse many words.

      I have not had any luck converting julian to YYYYMMDD.

      Walter Ericson

      in reply to: How can I strip a single element from a raw feed? #56912
      Walter Ericson
      Participant

        Here is a tcl script that removes MSH.8.3.

        Charlie Bursell wrote it to change ADT^XXX^XX to ADT^XXX.

        It is simular to what you want to do.

        Start with this script and you should be able to modified to what you need.

        -Walter Ericson

        in reply to: Route Properies->Que depth issue #56664
        Walter Ericson
        Participant

          Thanks very much.

          This makes sense.  It was kind of what I was expecting.

          I was just hoping for a cause and solution kind of answer.

          Although, your solution is a good answer.

          Thanks again,

          -Walter Ericson

          St. Lukes Episcopal Hospital

        Viewing 3 replies – 1 through 3 (of 3 total)