copyright (C) 2001  MSC-RPN COMM  %%%MC2%%%

      subroutine prsdate(yy,mo,dd,hh,mm,ss,sign,date) 6
      implicit none
      integer yy,mo,dd,hh,mm,ss,sign
      character*16 date
      character*16 tmpdate
      character*4 cyy
      character*2 cmo,cdd,chh,cmm,css

      if (date(1:1).eq.'-') then
         sign = -1
         tmpdate=date(2:16)
      else
         if (date(1:1).eq.' ') then
            sign = 1
            tmpdate=date(2:16)
         else
            sign = 1
            tmpdate=date(1:15)
         endif
      endif

      cyy=tmpdate(1:4)
      cmo=tmpdate(5:6)
      cdd=tmpdate(7:8)
      chh=tmpdate(10:11)
      cmm=tmpdate(12:13)
      css=tmpdate(14:15)

      read(cyy,'(I4)') yy
      read(cmo,'(I2)') mo
      read(cdd,'(I2)') dd
      read(chh,'(I2)') hh
      read(cmm,'(I2)') mm
      read(css,'(I2)') ss
      
      return
      end