I have created a
servlet which enters html form input into a db2 database, and it is all working nicely with integer values. However, I want to perform some date and time calculations calculations on the form input, for which I need the Date class. To perform the sql needed for the database entry, I "import java.sql.*;". In order to perform the date calculations, I "import java.util.*;". The date calulations work fine in a servlet which does not have java.sql imported. However, when I try to put this calculation into the database entry servlet, I get
"Ambiguous class: java.util.Date and java.sql.Date"
removing "import.java.util.*;" means that it cannot compile the Date class (i.e. java.sql.Date does something else). How can I make it ignore java.sql.Date?
Thanks,
James
[This message has been edited by James Hewitt (edited July 10, 2001).]