2018-07-12T00:00:00.000+05:30
成毫秒?让我知道如何转换
@Override
public void onDateSelected(@NonNull final DateTime dateSelected) {
// log it for demogetdata();
Log.i("HorizontalPicker", "Selected date is " + dateSelected.toString());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss z");
try {
Date mDate = sdf.parse(dateSelected.toString());
long timeInMilliseconds = mDate.getTime();
System.out.println("Date in milli :: " + timeInMilliseconds);
getdata(timeInMilliseconds);
} catch (ParseException e) {
e.printStackTrace();
}
}