Computation time difference

xiaoxiao2021-03-06  17

Public String Date_pcon (String Beginstr, String Endstr) {String Result = ""; Calendar C1 = Calendar.GetInstance (); Calendar C2 = Calendar.GetInstance (); Date Temp1, Temp2; Long L1 = 0, L2 = 0, L = 0; int h = 0, m = 0, s = 0; string time = ""; try {temp1 = my_time.parse (beginstr); temp2 = my_time.Parse (endstr); c1.settime (TEMP1); C2 .SETTIME (TEMP2); L1 = c1.geturationinmillis (); l2 = c2.gettimeinmillis (); L = L2-L1; H = (int) (l (60 * 60 * 1000)); m = (int) ((L% (60 * 60 * 1000)) / (60 * 1000)); s = (int) (((L% (60 * 60 * 1000))% (60 * 1000)) / 1000); Result = String.Valueof (h) ":" String.ValueOf (m) ":" String.Valueof (s);} catch (exception e) {Write_ERR (E); result = ";} Return RESULT }

转载请注明原文地址:https://www.9cbs.com/read-41472.html

New Post(0)