Convert your date and time to Milliseconds and feed to graph.
But on the graph only date will be displayed.
You can use DateFormat available in Java.
Here is the snippet of the code.
public static long StringToDate(String str_date) {
long lDate = 0;
try {
DateFormat formatter ;
Date date_obj ;
formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
date_obj = (Date)formatter.parse(str_date);
Calendar cal=Calendar.getInstance();
cal.setTime(date_obj);
lDate = cal.getTimeInMillis();
} catch (ParseException e) {
System.out.println("Exception :"+e);
}
return lDate;
}
Feed this lDate as input for x-axis to DataContentProvider.
Hope this solves your issue.