How to send Date object from flex to Java Restful Webservice using JSON -


i getting problem while sending date flex java webservices

i selecting date datefield , assigning dob field

var dob :date = datefield.selecteddate; 

when convert date object json , resulting in json object below not being accepted restfull webservice in java.

{"dob":{"fullyear":2015,"date":13,"hours":0,"month":6,"minutes":0,"milliseconds":0,"fullyearutc":2015,"seconds":0,"monthutc":6,"dateutc":13,"hoursutc":4,"minutesutc":0,"secondsutc":0,"millisecondsutc":0,"time":1436760000000,"timezoneoffset":240,"day":1,"dayutc":1} 

please me out in solving problem. in advance.

have u tried jodadatetime, use in project , works good. have send date in ("2015-09-10t01:19:42-06") format. jodadatime conevert date , time in millisecond.

fyi

  string inputdate = "2015-09-10t01:19:42-06";     //jodatime     datetime dt = datetime.parse(inputdate);     date jdkdate = dt.todate();     if(dt.tostring().endswith("z")) {         string dateformat = dt.tostring();         dateformat = dateformat.substring(0, dateformat.length()-1) + "+0:00";         system.out.println(dateformat);         system.out.println("==========================================");     }          system.out.println(dt.tostring()); 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -