DateTimePicker datePicker2 = DateTimePicker.createInstance();
datePicker2.doModal();
Calendar cal = datePicker2.getDateTime();
Date date = cal.getTime();
TimeZone _timeZone = TimeZone.getDefault();
int month = cal.get(Calendar.MONTH);
int year = cal.get(Calendar.YEAR);
int date =cal.get(Calendar.DATE);
int day = cal.get(Calendar.DAY_OF_WEEK);
int hour = cal.get(Calendar.HOUR);
int min = cal.get(Calendar.MINUTE);
int sec = cal.get(Calendar.SECOND);
int miliS33 = cal.get(Calendar.MILLISECOND);
我使用'datetimepicker`获取所选日期的所有字段,但我只想将此日期转换为毫秒,我怎么能这样做..我已经使用过
long gmtOffset = _timeZone.getOffset(1, year, month, date,day,miliS);
但这对我不起作用。
请提供一些代码的建议......!