PLEASE USE GREGORIAN CALENDAR....THERE IS A FUNCTION
KNOWN AS GETMONTHS.....USE THAT.....
--- Senaka Suriyaarachchi <[EMAIL PROTECTED]>
wrote:
> Hi All
> I tried to show drop down list with next 30 dates.
> but it doesn't work. It
> correctly add up to 25 days after that it show
> previous days. Please advice
> me.
>
> BR
> Senaka
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN">
> <%@ page language="java" import="java.sql.*,
> java.util.Date"%>
> <jsp:useBean id="conn" class="ConnectLib"
> scope="session" />
> <html>
> <head>
> <title>Untitled</title>
> </head>
>
> <body>
> <%
> Date nd = new Date();
> long lnd = nd.getTime();
> Date todate = new Date(lnd);
> String today = todate.toString();
> java.sql.Date dbday = new
> java.sql.Date(lnd);
> long lndnew = lnd;
> %>
> <form action="">
> <table>
> <tr>
> <td colspan="3">Reservation Date</td>
> <td><select name="reservDate">
> <% for(int i=1; i<27; i++){%>
> <option value="<%=(lndnew+
> i*24*60*60*1000)%>"><%= (new
> java.sql.Date(lndnew + i*24*60*60*1000))%></option>
> <% }%>
> </select>
> </td>
> <td><input type="submit"
> name="reserv" value="Reserv"></td>
> </tr>
> </table>
> </form>
>
> </body>
> </html>
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body:
> "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets