P
pranesh.nayak
Hello again,
I need to convert date to "yyyy-MM-ddTHH:mm:ss" format.
Below code does this, but it appends time twice in date variable.
DateTimeFormatInfo dy = new DateTimeFormatInfo();
dy.ShortDatePattern = "yyyy-MM-ddTHH:mm:ss";
dy.ShortTimePattern = "";
// next set dy to current culture
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat =
dy;
// now parse the date
DateTime date = DateTime.Parse("2006/12/12", new CultureInfo("en-US"),
DateTimeStyles.None);
This is appending time twice in date variable, (eg:
"2006/12/12T01:00:00 01:00:00")
I need to pass this variable (as DateTime type) to Java webservice.
any suggestions on how to get the date in reqd format?
Thanks
I need to convert date to "yyyy-MM-ddTHH:mm:ss" format.
Below code does this, but it appends time twice in date variable.
DateTimeFormatInfo dy = new DateTimeFormatInfo();
dy.ShortDatePattern = "yyyy-MM-ddTHH:mm:ss";
dy.ShortTimePattern = "";
// next set dy to current culture
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat =
dy;
// now parse the date
DateTime date = DateTime.Parse("2006/12/12", new CultureInfo("en-US"),
DateTimeStyles.None);
This is appending time twice in date variable, (eg:
"2006/12/12T01:00:00 01:00:00")
I need to pass this variable (as DateTime type) to Java webservice.
any suggestions on how to get the date in reqd format?
Thanks