java - Converting total amount of days in the year so far, to a day in a month -
i'm converting timestamp payload 1430848842000, simpledateformat(yyy-mm-dd hh:mm:ss)
. output is:
2015-05-125 14:00:42
as can see, days part of conversion odd. instead of giving me date in month of may year, instead gave me total amount of days in year leading timestamp creation.
i did quick math , determined 125 time stamp, should mean 5th of may, how can convert automatically output looks like:
2015-05-5 14:00:42
?
your simpledateformat should yyyy-mm-dd hh:mm:ss
instead of yyyy-mm-dd hh:mm:ss
. "dd" "dd" instead.
Comments
Post a Comment