Greets,
I am trying to retrieve a date value stored on another page and compare the value retrieved with another value.
the date is coming from a listbox on page A and being retreived like this:
String eDate = request.getParameter("Dt"
session.setAttribute("endate",eDate);
on page B, i see that it stored the value successfully and will even print the value on the page UNTIL i add the if statement:
String varDate = (String)session.getAttribute("endate"
// out.print(varDate); (this one worked)
if(varDate == "2003-09-08 11:30:00"{ (this didnt)
out.print(varDate);
}
If i remove the quotes "" from the date i get an error, however with them there, it does not seem to read the value properly and will not enter the if.
any suggestions?
thanks in advance.
I am trying to retrieve a date value stored on another page and compare the value retrieved with another value.
the date is coming from a listbox on page A and being retreived like this:
String eDate = request.getParameter("Dt"
session.setAttribute("endate",eDate);
on page B, i see that it stored the value successfully and will even print the value on the page UNTIL i add the if statement:
String varDate = (String)session.getAttribute("endate"
// out.print(varDate); (this one worked)
if(varDate == "2003-09-08 11:30:00"{ (this didnt)
out.print(varDate);
}
If i remove the quotes "" from the date i get an error, however with them there, it does not seem to read the value properly and will not enter the if.
any suggestions?
thanks in advance.