Calcular dias entre 2 fechas
Hola y gracias por adelantado, como puedo calcular los dias que hay entre dos fechas? he intentado hacer
declare
dias number;
begin
dias:= :bloque1.fecha2 - :bloque1.fecha1;
end;
pero no me sale.......si me podeis ayudar...gracias de nuevo
declare
dias number;
begin
dias:= :bloque1.fecha2 - :bloque1.fecha1;
end;
pero no me sale.......si me podeis ayudar...gracias de nuevo
Pues chato, no se que es lo que no te sale....
Mira :
SQL*Plus: Release 8.0.5.0.0 - Production on Lun Jun 12 18:04:26 2006
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.4.0 - 64bit Production
SQL> select
2 to_date(\'11062006\',\'ddmmyyyy\') -
3 to_date(\'01062006\',\'ddmmyyyy\') Dias
4 from dual
5 /
DIAS
---------
10
SQL>
Mira :
SQL*Plus: Release 8.0.5.0.0 - Production on Lun Jun 12 18:04:26 2006
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.4.0 - 64bit Production
SQL> select
2 to_date(\'11062006\',\'ddmmyyyy\') -
3 to_date(\'01062006\',\'ddmmyyyy\') Dias
4 from dual
5 /
DIAS
---------
10
SQL>
