Tuesday 6 June 2017

i am getting an error the value "date" is not a valid AllXsd value in node.js service

I need help. While passing a datetime parameter to a web service, i am getting an error: Input XML was not in a correct format. The value "date" is not a valid AllXsd value. I have installed npm date-time and npm dateformat.

Code snippet:

Var datetime=require("date-time");
Var dateformat = require("dateformat");

Var dt="#6/2/2017 5:02:03 PM#";
Var d=new date(dt);  //tried with this but getting error 
Var d=new date(dt).toISOString();   //this throws error too but a diff one..input string was not in a correct format
Var d=datetime({local:false}); //also not working
Var d=dateformat(dt, "m/d/yyyy hh:mm:ss TT");  // throws error
Var dtime = [d.getMonth() + 1,
                  d.getDate(),
                  d.getYear()].join('/')];  //this also throws error 

//Service call
Controller.servicename(url, params: {d or dtime});



via arindam majumder

No comments:

Post a Comment