This content has been marked as final. Show 4 replies
Looked at the Date class and its methods in the API.
Look at the following to convert a String to a Date class
Once you have a Date class you can do a getTime() on the Date. This will return a long.
You can get the current time (also of type long) using System.currentTimeMillis().
Now you have two longs and you can compare them anyway you want.
Once you have a Date class you can do a getTime() on the Date.Or you could use the before and after methods!
OP: Why is table column BookReturnDate of a String type instead of type DATE?
That sounds like a basic mistake in your database design.