How can we Compare the date we input in the textfield to insert to database with the current date ?
please Hint me !
Thanks a lot !

11-24-2008, 11:55 PM

xcallmejudasx

check the Calender api and define textfield. If you're using a String variable you need to format it the same way the API is formatted and could probably use .equalsIgnoreCase() to check if their the same. If your using a GUI and the input is of type Text then just textVariable.getText() will return a string

11-25-2008, 09:10 AM

masijade

Use SimpleDateFormat to parse the date String into an actual Date, then use a PreparedStatement and setDate with that Date object to enter the Date into your query.

If you are asking for the SQL statement itself, then please find an SQL forum.