Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to compare a string with integer in jsp

843835Jul 8 2002 — edited Jul 8 2002
I 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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2002
Added on Jul 8 2002
9 comments
453 views