Convert Json date to java calendar -
i have following value /date(1234043600000)/ in string type , need convert java calendar type without success,i have tried use following post , create date , post
how format microsoft json date?
date date = new date(parseint(jsondate.substr(6))); , someting calendar cal = calendar.getinstance(); cal.settime(date); i got error in first line since in word date have line in middle , substr(6) have error (the method substr(int) undefined type string) ,how should continue .
thanks!
this should work in java
date date = new date(long.parselong(jsondate.replaceall(".*?(\\d+).*", "$1"))); the problem example it's javascript
Comments
Post a Comment