Possible duplicates:
I am trying something like this, where I am trying to get the date from Cambobox
Calendar start = calendar.Ast Instance (); Calendar End = Calendar. Just Instance (); Int Sdate = Integer.print (cmbSdate.getSelectedItem). ToString ()); Int'mmonth = CMBMMath.GetSelected Index (); Int sair = integer. ParisInt (CMBCIrGetSchlightTime) .Toastring ()); IntetAdit = Integr .Presscent (cmbEdate.getSelectedItem (.) ToString ()); Favored Emonth = cmbEmonth.getSelectedIndex (); Int eye = integer. ParisInt (CMBEARGETSchlightIT) (.) Toasting ()); Start.set (Syear, Smonth, Sdate); End.set (Eyear, Emonth, EDATE); Date format date format = new simpledate format ("yY-MM-DD"); String Startdate = Datformat. Format (start.getTime ()); String end date = dateform.form (end.getTime ());
I can not subtract the end and the due date how do I get the difference between start date and end date?
This will not work while crossing the daylight savings time (or leap seconds) as Orange 80 and it can not produce expected results while using different time of day . Using JodaTime can be easy for the right results, because I know that the only correct way with plain Java is to use Calendar and to calculate the method before or after:
Comments
Post a Comment