User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 423,493 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,776 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 1355 | Replies: 4
Reply
Join Date: Feb 2008
Posts: 36
Reputation: brr is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
brr brr is offline Offline
Light Poster

how to get days between

  #1  
May 27th, 2008
i have to get days of that particular month , that is if i give dates between different months like
ex: 25-FEB-2008 and 05-MAR-2008
in this i want get 5 days only not 10 days
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 4
Reputation: RamyaJayaram is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
RamyaJayaram RamyaJayaram is offline Offline
Newbie Poster

Re: how to get days between

  #2  
May 27th, 2008
Hi,
Do you want to get the difference between the day you give as input and the end of month or start of month???
Reply With Quote  
Join Date: Feb 2008
Posts: 36
Reputation: brr is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
brr brr is offline Offline
Light Poster

Re: how to get days between

  #3  
May 27th, 2008
Originally Posted by RamyaJayaram View Post
Hi,
Do you want to get the difference between the day you give as input and the end of month or start of month???


if i give days between 4 months, but i want days only till end of the first month only
Reply With Quote  
Join Date: Sep 2004
Posts: 4
Reputation: RamyaJayaram is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
RamyaJayaram RamyaJayaram is offline Offline
Newbie Poster

Re: how to get days between

  #4  
May 27th, 2008
Hi,
You have a function called last_day in oracle.
< select (last_day(trunc(sysdate))-trunc (sysdate)) DayDiff from dual >

Resulted in
DayDiff
--------
4
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,270
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 80
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: how to get days between

  #5  
May 28th, 2008
Originally Posted by brr View Post
if i give days between 4 months, but i want days only till end of the first month only

why you need to pass dates for that.

Last_day will do that for you with only one parameter.
Share your Knowledge.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Oracle Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Oracle Forum

All times are GMT -4. The time now is 4:04 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC