Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function compruebaDif(){
- if($this->primer_arhchivo){
- $this->spreadsheet = PhpOfficePhpSpreadsheetIOFactory::load( "Diciembre 01.xlsx");
- $this->celda_fech = $this->spreadsheet->getActiveSheet()->getCell("E5")->getFormattedValue();
- $dt = new DateTime($this->celda_fech);
- $nueva = $dt->format('d/m/Y');
- $this->subFecha = $nueva;
- echo $this->subFecha;
- }elseif (!$this->primer_arhchivo){
- $this->spreadsheet = PhpOfficePhpSpreadsheetIOFactory::load( "Diciembre 02.xlsx");
- $this->celda_fech = $this->spreadsheet->getActiveSheet()->getCell("E5")->getFormattedValue();
- $dt = new DateTime($this->celda_fech);
- $nueva = $dt->format('d/m/Y');
- $this->fechActual = $nueva;
- $this->diferencia = $this->fechActual->diff($this->subFecha);
- echo $this->diferencia;
- }
- $this->primer_arhchivo = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement