richfaces - How to compare two different Date Value in Java? -
i work richfaces calendar component. use rich faces 3 und have 2 calendar components.
how possible compare 2 date values in way, 1 these 2 value can higher other one?
the 2 values initialize in way:
date startdate = new date(); date enddate = new date(); now user can select datevalues in rich faces calendar und selected values saved in variables.
how can compare 2 values?
greetz
have checked documentation? there methods compareto(), before(), after() etc lots of options comparison depending on needs. use gettime() method find milliseconds since epoch of each time, manipulate these find timespan between times.
http://docs.oracle.com/javase/6/docs/api/java/util/date.html
Comments
Post a Comment