Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compare months between date field and system date  RSS feed

 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36875
481
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting the solution so that others who see this thread in the future can benefit.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!