I am pulling a smalldatetime from SQL Server database into a java class (2014-03-11 11:49:00) and would like to do a comparison of this date-1 and today's date in java. The only problem is when pulling the date from the database it is assigned to a String variable, therefore I need some way of converting the String to a smalldatetime-1day in the java code. Also, I need a way to find (todays date) in the same format.
I have looked around for the last hour with little success.
if((today's date) >= (smalldatetime -1day)) {
//do something
}
Thanks!