SQL - Get difference between two dates (by year/month/day)

From GUILLARD WIKI
Revision as of 16:25, 3 May 2018 by Guillard (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
select
trunc(months_between(fac_dte_final_mat+1,fac_dte_effective) /12) ||' Years '||
trunc(months_between(fac_dte_final_mat+1,fac_dte_effective)) ||' Months '||
trunc(fac_dte_final_mat+1-fac_dte_effective) || ' Days ' 
"Duration Pricing (fac)"
from 
vls_facility;