i'm developing a website using Java..
for a specific page i want to limit access to that page by TIME of the day..
simply i want to give a error massgae after 6pm if user try to access that page..
so i want to check isCurrentTimeBefore 6 pm...
code i tried is...
java.sql.Time time = new Time(System.currentTimeMillis());
java.sql.Time time0 = new Time(06,00,00);
You will save object creation time if you use the time methods of the System class Note I said time methods; I know of two, so you should consider carefully which is more appropriate for your purposes.