How to convert Date of v.b to DateTime of c#
-
I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#
At a guess, it's a string - or you wouldn't be converting it. Which implies the service computer and the application computer are using different locales, or cultures. Don't - pass it as a date value: always keep values in the most sensible datatype, rather than strings...
You looking for sympathy? You'll find it in the dictionary, between sympathomimetic and sympatric (Page 1788, if it helps)
-
I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#
Djay Hole wrote:
web service language is c#
No web service is web service. It might be implemented in C# but that doesn't change anything.
Djay Hole wrote:
exception string is not in good format my code
The web service expects a web service call with the data in the format that it expects. And you are not sending it that way. Figure out the correct format and send it that way.
-
I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#
Look into the DateTime ToString[^] method and the DateTime TryParseExact[^] methods. Although you could just pass the Date or DateTime objects as is? Chances are it is compatible. But for the record, I'm assuming you're talking VB.Net?
V.
(MQOTD rules and previous solutions)