string parsing - java.text.ParseException: Unparseable date: "531772200000" -


i need convert string 531772200000 java date object. date stored in database.

when doing this, getting java.text.parseexception: unparseable date: "531772200000".

my code:

string datetobeconverted = string.valueof(dbobject.get("customerdateofbirth")); string parseabledate = datetobeconverted     .replace("/date(","")     .replace(")/","")     .replace("+0530", ""); dbobject.put("_id", string.valueof(dbobject.get("userinfoid"))); simpledateformat formatter = new simpledateformat("dd-mmm-yyyy"); date date; date = formatter.parse(parseabledate); 

this looks timestamp value, give date:

new date(long.parselong("531772200000")); 

which works out @ fri nov 07 1986 18:30:00 gmt+0000


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -