This is my implementation
            QName fechaComision = QName.createQName("my.new.model", "fecha");
            QName fechaCreacion = ContentModel.PROP_ARCHIVED_DATE;
            Map propiedades = this.nodeService.getProperties(actionedUponNodeRef);
            
            Date fechaCo = (Date)propiedades.get(fechaComision);
            Date fechaCre = (Date)propiedades.get(fechaCreacion);
            
            //Date fechaCo=(Date)this.nodeService.getProperty(actionedUponNodeRef, fechaComision);
            //Date fechaCre=(Date)this.nodeService.getProperty(actionedUponNodeRef, fechaCreacion);
            System.out.println(fechaCo.toString());
            System.out.println(fechaCre.toString());
            long time = fechaCo.getTime() - fechaCre.getTime();
            
          //          Muestro el resultado en dÃÂas
            int dias=(int)(time/(3600*24*1000));
            if (dias<7)
            {
               
               this.nodeService.setProperty(actionedUponNodeRef, fechaComision, fechaCre);
            }
The error is in System.out.println(fechaCre.toString()); , but I dont know why. I think that the bad line is this 
QName fechaCreacion = ContentModel.PROP_ARCHIVED_DATE;