Basically, MySQL
DATETIME
data type's format is this one: "2014-02-14 16:43:04" but when deserializing with Gson
I get a Unparseable date: "2014-02-14 16:43:04"
.
I'm guessing I'm using an incorrect object for this, I'm using java.sql.Timestamp;
what is the correct object for this, or is it that I need to configure some date format to Gson
? if so, how to?
Edit: What happens with the setDateFormat()
if I use DATE
(yyyy-mm-dd) and also DATETIME
(yyyy-mm-dd hh:mm:ss), will any of them be affected?