javascript - Internal server error- date malformed -


i working backbone js , oracle db. application date in dump 15/04/16 , i've created form using js when click on submit getting following error.

        top of stack :      org.springframework.http.converter.json.abstractjackson2httpmessageconverter.readjavatype(abstractjackson2httpmessageconverter.java:224)   **** bottom of stack :          org.joda.time.format.datetimeformatter.parselocaldatetime(datetimeformatter.java:900)         **** exception invalid format: "15/04/2016" malformed @ "/04/2016"         **** stack trace  

the date format not valid. joda-time api used default locale format in jvm. have parse input date. can use part of code

        //input date     string input = "15/04/16";     //cast input joda datime     datetime dt = datetimeformat.forpattern("dd/mm/yy").parsedatetime(input);     //use tostring method take format string needed     string output = dt.tostring(format_date);     //output date     system.out.println(output);// shoud 04/15/2016 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -