| Author |
Difference between two timestamp fields
|
JayaSiji Gopal
Ranch Hand
Joined: Sep 27, 2004
Posts: 303
|
|
I have two fields DECISION_DATE and EVENT_DATE Both are of type Timestamp in the database(DB2 v8) i want to check if the diff between the two dates is 1. I tried days(DECISION_DATE) - days(EVENT_DATE) = 1 . I get the exception: days() is not a valid function. What would be the best way?
|
SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
|
 |
Qussay Najjar
Ranch Hand
Joined: Jan 18, 2008
Posts: 53
|
|
Hi JayaSiji, Honestly I don't know the solution for this using Java methods, I've faced this problem before, but as I'm using Oracle DB I used a query as the next: This is how I solved my problem that day, hope it helps or gives a clue..
|
Qussay NAJJAR
|
 |
 |
|
|
subject: Difference between two timestamp fields
|
|
|