How to find days between two dates

To discuss Oracle Forms & Reports related technical issues.
Post Reply
musman
Posts: 31
Joined: Thu Apr 26, 2007 10:35 am
Location: Pakistan

How to find days between two dates

Post by musman »

i want to find days between two dates

example

p_from_date = '2009/01/01 HH24:MI:SS'

p_to_date = '2009/12/09 HH24:MI:SS'

How i find exact days between these two dates.
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

Code: Select all

Select to_date('2009/12/09','YYYY/MM/DD') - to_date('2009/01/01','YYYY/MM/DD')
from dual
if there is time involved, then use the TRUNC function to get the exact number of days between 2 dates.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests