0

how to compare date?

one i have taken in mysql another one i have taken in html..now how can i compare? i m doing servlet

10th Mar 2017, 3:23 AM
Somnath Ghosh
Somnath Ghosh - avatar
1 Answer
+ 1
you would have to get date from html as string. string Hdate = request.getParameter("date"); then get from db. //not sure how to do that...... then compare, assuming they are in same format. like if you used now() in mysql. Hdate.equals(Mdate); hope this helps
10th Mar 2017, 5:27 AM
Michael Szczepanski
Michael Szczepanski - avatar