R
ruds
Hi,
I want to compare 3 dates from my database. Actually, I want to check
one date with the other 2 dates if they are befor or after the first
date. I have tried using the before and after methods but I'm not
getting any o/p.
Here is the code for comparing: fdate, cdate & accdate are the dates
from database retrived using rs.getDate();
<%f((ifdate.equals("null")) && (cdate.equals("null"))) { %> NA <%}
else{ if((fdate.after(accdate)) || (cdate.after(accdate))){%> N <%}
else if((fdate.equals("null")) || (cdate.after(accdate))) {%> N <%}
else if((fdate.after(accdate)) || (cdate.equals("null"))) {%> N <%}
else{%> Y <%}}%>
This code is from a JSP page.
Please tell what is going wrong.
Thanks
I want to compare 3 dates from my database. Actually, I want to check
one date with the other 2 dates if they are befor or after the first
date. I have tried using the before and after methods but I'm not
getting any o/p.
Here is the code for comparing: fdate, cdate & accdate are the dates
from database retrived using rs.getDate();
<%f((ifdate.equals("null")) && (cdate.equals("null"))) { %> NA <%}
else{ if((fdate.after(accdate)) || (cdate.after(accdate))){%> N <%}
else if((fdate.equals("null")) || (cdate.after(accdate))) {%> N <%}
else if((fdate.after(accdate)) || (cdate.equals("null"))) {%> N <%}
else{%> Y <%}}%>
This code is from a JSP page.
Please tell what is going wrong.
Thanks