aspose file tools*
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
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31068
    
232

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