jeudi 3 décembre 2015

How to pick only today and tomorrow jsonarray data by Date & Time and put in list view adapter

here my jsonArray data like:

[{"LeadId":4,
 "CoreLeadId":0,
 "CompanyId":7,
 "AccountNo":"5675",
 "ScheduleOn":"2015-05-11T00:00:00"},
{"LeadId":7,
 "CoreLeadId":2,
 "CompanyId":8,
 "AccountNo":"sample string 4",
 "ScheduleOn":"2015-12-01T15:04:23.217"}]

i want to pick only today and tomorrow jsonarray dateandtime(ScheduleOn) and put into listview. below i side i send snnipt of my code where i set adapter. i retrieve data from database. Please help me.

   JSONArray jsonArray = dpsFunctionFlow.getAllServiceDetail("1");
   listItemService = new Gson().fromJson(jsonArray.toString(),
        new TypeToken<List<AppointmentInfoDto>>() {
        }.getType());
    mAdapter = new AdapterAppointment(getActivity(), listItemService);
    listView.setAdapter(mAdapter);

Aucun commentaire:

Enregistrer un commentaire