This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes compare months between date field and system date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "compare months between date field and system date" Watch "compare months between date field and system date" New topic
Author

compare months between date field and system date

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
Hi this is a question for ORACLE database.

I wana know how can you take the difference of days between a Date field in table and the system date where their difference must be 30?

for example the date field value is 8/30/2006 and the system date is 7/31/2006. How do I calculate the difference of days between them?


I'm not available, my BF's name is WORK.
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
erm... never mind I think I found the solution:
select CUST_WSID from LICENSE WHERE LIC_EXPIRYDATE = TO_DATE(SYSDATE + 90)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30392
    
150

Thanks for posting the solution so that others who see this thread in the future can benefit.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compare months between date field and system date