select
TO_CHAR(start_date,’DD.MM.YYYY HH24:MI:SS’) start_date,
TO_CHAR(end_date,’DD.MM.YYYY HH24:MI:SS’) end_date,
trunc(86400*(end_date-start_date))-
60*(trunc((86400*(end_date-start_date))/60)) seconds,
trunc((86400*(end_date-start_date))/60)-
60*(trunc(((86400*(end_date-start_date))/60)/60)) minutes,
trunc(((86400*(end_date-start_date))/60)/60)-
24*(trunc((((86400*(end_date-start_date))/60)/60)/24)) hours,
trunc((((86400*(end_date-start_date))/60)/60)/24) days,
trunc(((((86400*(end_date-start_date))/60)/60)/24)/7) weeks
from tablo

Reklamlar