I'm working on a page that creates a date time field and then inserts it into the database. To do this I've had to include some java files: <%@ page import="java.util.*, java.text.*" %> <%@ page import= "java.sql.*" %> When I try to create a new Date with the following code I get an error saying there is a conflict with java.util.* and java.sql.* both having date functions. But the Date functions won't work with just the sql files. Code: String sOut = "";
Date today = new Date(); DateFormat df = DateFormat.getDateTimeInstance(); out.print("Date:" + df.format(today)); sOut=df.format(today); session.setAttribute("snFinishTime", sOut); response.sendRedirect("endSession2.jsp");