c...	file datestamp_sgi.f

c_Subr===1=========2=========3=========4=========5=========6=========712
      SUBROUTINE datestamp(date_stamp) 
c  format year-month-day  hour:minutes:seconds
c  That is, 'year-mm-dd hh:mm:ss' (20 charcters)

      IMPLICIT NONE
c...	passed variables
      character*20 date_stamp

c...	passed variables
      CHARACTER*9 Txt_DATE
        character*8 txt_time

c...	local variables
c      character*20 txt_time, txt_date
      integer i
      character*2 month
      
ccc SGI date_and_time 13:51:02 16-Jan-02
      call time(txt_time) !! 8 characters
      call date(txt_date)!! 9 characters

      month = '??'
      if (txt_date(4:6) .eq. 'Jan') month = '01'
      if (txt_date(4:6) .eq. 'Feb') month = '02'
      if (txt_date(4:6) .eq. 'Mar') month = '03'
      if (txt_date(4:6) .eq. 'Apr') month = '04'
      if (txt_date(4:6) .eq. 'May') month = '05'
      if (txt_date(4:6) .eq. 'Jun') month = '06'
      if (txt_date(4:6) .eq. 'Jul') month = '07'
      if (txt_date(4:6) .eq. 'Aug') month = '08'
      if (txt_date(4:6) .eq. 'Sep') month = '09'
      if (txt_date(4:6) .eq. 'Oct') month = '10'
      if (txt_date(4:6) .eq. 'Nov') month = '11'
      if (txt_date(4:6) .eq. 'Dec') month = '12'

      write (date_stamp, 200) txt_date(8:9), month, txt_date(1:2),
     &      txt_time(1:8)
 200  format('20', a2, '-', a2, '-', a2, 2x, a8)     !! 4+4+4+8

cDebug      write (*,*) 'datestamp_sgi: "', txt_date, '" "', txt_time, '"'
cDebug      write (*,*) 'datestamp_sgi: "', date_stamp, '"'
      return
      END

     
      
