Hello, I have a WCF service that requires some DateTime parameters to be passed in. The service will be used globally and be consumed by different clients (.NET, PHP etc). What is the best format to get the datetime parameters in? I was thinking of making them string parameters, and then advising the users of the format needed.
Maybe something like "yyyy-MM-ddTHH:mm:ss"
Then in the service I could do something like this;
DateTime usedatetime = DateTime.ParseExact(PassedDate, "yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture);
I did try this, it worked fine on my local pc, but failed on the deployment server..."String was not recognized as a valid DateTime."
I guess my question is; What is the best way to handle date parameters in WCF? I really hope that makes sense...