      FUNCTION ISPCTIM(FIELDS,NF,NERR)
C
C     FIGURE OUT HOW MANY SPACES THE TIME FIELD TAKES UP
C
      CHARACTER FIELDS(50)*10,FLDTYPE*1
C
      NX=0
C
C     FIND THE FIRST NON - "X" FIELD
C
      I1 = 1
      DO WHILE (INDEX(FIELDS(I1),'X').NE.0)
           I1=I1+1
      ENDDO
C
      NF=0
      IF(INDEX(FIELDS(I1),'A').NE.0)THEN
C
C          TIME IS IN ALPHA FORMAT
C
           DO I=1,I1
                NX=NX+IFLDLEN(FIELDS(I),FLDTYPE)
           ENDDO
           NF=I1
C
      ELSE
C
C          TIME BETTER BE IN 5 OR 6 INTEGER FORMAT
C
           DO I=1,5
                LOOP=.TRUE.
                DO WHILE (LOOP)
                     NF=NF+1
                     NX=NX+IFLDLEN(FIELDS(NF),FLDTYPE,NERR)
                     IF(FLDTYPE.EQ.'I')LOOP=.FALSE.
                ENDDO
           ENDDO
C
C          CHECK FOR A 6TH INTEGER
C
           LOOP = .TRUE.
           NX_SAVE = 0
           IFX_SAVE = 0
           DO WHILE (LOOP)
                NF=NF+1
                IFL =  IFLDLEN(FIELDS(NF),FLDTYPE,NERR)
                IF (FLDTYPE.EQ.'I') THEN
                     NX = NX + IFL + NX_SAVE
                     LOOP = .FALSE.
                ELSE IF (FLDTYPE.EQ.'X') THEN
                     NX_SAVE = NX_SAVE + IFL
                     IFX_SAVE = IFX_SAVE + 1
                ELSE
                     NF = NF - 1 - IFX_SAVE
                     LOOP = .FALSE.
                ENDIF
           ENDDO 
                                  
      ENDIF
C
      ISPCTIM=NX
      RETURN
      END
