Question: I receive date as string from web service in following format `2014-02-27T11:17:00.000Z` Could someone tell me how to parse it as Date time object in Java.

I tried parsing it `Date.parse()` but it didn't work properly.

Then I tried date formatter but it crashes the app. Could someone enlighten me please.

Answer: 
```
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
    Date d = sdf.parse("2014-02-27T11:17:00.000Z");

```
You can use dateformat class for that. 

```
DateFormat sdt = new SimpleDateFormat(put your format here);
Date stime= sdt.parse(starttime);
Date etime = sdt.parse(endtime);

```

Starttime and end time are the strings which you want to parse