3
我想多少日期,小時,分鐘和秒其餘形式的日期1獲取多少時間(天,小時,分鐘)保持於分配日期時間(安卓)
String RemainingOn = "2013/25/1 22:36:24";
String mDate,mHour,mMinute,mSecond;
public String DateComparedateTime()
{
// compare RemainingOn with now
mDate = Difference date with RemainingOn and Now;
mHour = Difference hour with RemainingOn and Now;
mMinute = Difference minute with RemainingOn and Now;
mSecond = Difference second with RemainingOn and Now;
return mDate+","+mHour+","+mMinute+","+mSecond ;
}
是否有任何理由不能傳遞'Date'或至少'long'而不是'String'? – seaplain
是的,我想把返回結果放在textview – Saeed
不是返回,而是傳入的參數 – seaplain