i got the date from oracle database using servlet programming

string dt=x.getDatabas eValue("select sysdate from dual");

my problem is i got nother date i have entered now i want to compare both
but the format i assigned like String dt is not correct
can anyone help