The string format is yyyy-MM-dd HH:mm
, for example 2017-01-01 10:30
.
How to parse the string to date using Gson?
The string format is yyyy-MM-dd HH:mm
, for example 2017-01-01 10:30
.
How to parse the string to date using Gson?
Create Gson Object and pass Date format like this,
Gson gson = new GsonBuilder().setDateFormat(YOUR_DATE_FORMAT).create();
Hope this may help you.