how to compare a string with integer in jsp
843835Jul 8 2002 — edited Jul 8 2002I have a field in database called as enddate
i m trying to split the entire date and get date,month and year
once i store the date in a variable called as fmdate which is string,
i need to compare it with another integer.
how can i compare it..heres my code
stdate=RS.getString("start_date");
fmdate=stdate.substring(8,10);
fmmonth=stdate.substring(5,7);
fmyear=stdate.substring(0,4);
and this is where i want to compare the value of j to fmday...
<td class="btext" valign="center">Day<select name="fmday">
<%
for(int j=1;j<=31;j++)
{
String s;
parseInt(s)=j;
if (fmdate.equals(s))
{
%>
<option value="<%=j%>"><%=j%></option>
<% } else { %>
<option value="<%=j%>"><%=j%></option>
<%
}
} %>
</select>
pl help me...
Thanks Srini