c# - Convert.ToDateTime() Function returning an Exception Failed to convert parameter value from a String to a DateTime -


recently migrated wcf asp.net webapi

till worked perfectly, after migrated wcf getting exception when converting string datetime.

failed convert parameter value string datetime.

event if string valid datetime getting error.

thank you

you can try using datetime.tryparse(string inputparam ,datetime outvariable) method returns boolean value if succeeded , stores datetime value in out datetime variable.

please refer below link more information.

https://msdn.microsoft.com/en-us/library/ch92fbc1(v=vs.110).aspx


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -