How to send Date as a DateTime Object?.
-
Hi, I need to send startDate to a Service like following format.But I need to send it as a DateTime Object NOT like string format.So How do I send following Date with DateTime Object? 2007-07-29T00:00:00.0000000+05:30 Please kindly reply me. Thanks in advance.
-
Hi, I need to send startDate to a Service like following format.But I need to send it as a DateTime Object NOT like string format.So How do I send following Date with DateTime Object? 2007-07-29T00:00:00.0000000+05:30 Please kindly reply me. Thanks in advance.
Hi, DateTime is a serializable class, and there is no issue sending it to the Services like "Remoting" server as a parameter of a interface function call. Also, if you are trying to send it to the other service which has been written using C#, you can serialize the DateTime object and send it as "byte" data, and get it deserialized at the sever end.
Manoj Never Give up
-
Hi, DateTime is a serializable class, and there is no issue sending it to the Services like "Remoting" server as a parameter of a interface function call. Also, if you are trying to send it to the other service which has been written using C#, you can serialize the DateTime object and send it as "byte" data, and get it deserialized at the sever end.
Manoj Never Give up
Hi, Thanks for reply. But in my XML Web Service,There is a DateTime Property called "StartDate". So I need to send following format to there as a DateTime object. 2007-07-29T00:00:00.0000000+05:30 Problem is how can I send +05:30 with the DateTime object?. Thanks in advance
-
Hi, Thanks for reply. But in my XML Web Service,There is a DateTime Property called "StartDate". So I need to send following format to there as a DateTime object. 2007-07-29T00:00:00.0000000+05:30 Problem is how can I send +05:30 with the DateTime object?. Thanks in advance
why dont you use one more parameter for the Time Zone value.
Manoj Never Give up
-
why dont you use one more parameter for the Time Zone value.
Manoj Never Give up
hi, We are unable to change the xml webservice.We can send request to service and take response. In the Request we need to send StartDate with Time Zone. Thanks in advance.
-
Hi, I need to send startDate to a Service like following format.But I need to send it as a DateTime Object NOT like string format.So How do I send following Date with DateTime Object? 2007-07-29T00:00:00.0000000+05:30 Please kindly reply me. Thanks in advance.
Maybe this helps string dateformat; TimeZone localZone = TimeZone.CurrentTimeZone; dateformat = DateTime.Now.ToString("yyyy-MM-dd") + "T" DateTime.Now.TimeOfDay.ToString() + localZone.GetUtcOffset(DateTime.Now); dateformat gets somting like: "2007-05-21T18:26:24.8906250-03:00:00" you may need to cut the last ":00". Replace de DateTime.Now for the DateTime Object you need to send.