0
我正在讓用戶輸入日期和時間。我需要將它更改爲int以適應sqlight DB。我試圖解析它到一個字符串,然後到一個int,但這不工作任何想法?將dateTime轉換爲int
Time newTime= new Time();
newTime.hour=fmtTime.HOUR0_FIELD;
newTime.minute=fmtTime.MINUTE_FIELD;
newTime.monthDay=fmtDate.DAY_OF_WEEK_IN_MONTH_FIELD;
newTime.month=fmtDate.MONTH_FIELD;
newTime.year=fmtDate.YEAR_FIELD;
int currentTime=newTime.get;//how would I convert newTime to an int?