[mono-android] DateTime .ToString(.....)

Wally McClure theevilprogrammer at hotmail.com
Wed Jun 6 19:33:45 UTC 2012





I've got the code below.  Basically, I am trying to send a date across to a REST based service.  I'm trying to send it in the format like "05/24/2012"  Unfortunately, this doesn't seem to be happening.  I am always getting the time portion sent across as well.  I literally don't want the time sent across.  When I inspect the lurl variable before data get's sent across the wire, the time is sent as well.  Any suggestions on stripping this out?  What am I missing?  I assume that this is something I am doing wrong, but danged if I can figure it out. PS. Yes, I know its bad to send the userid and password across the url on a GET. Long story.         public IAsyncResult BeginMessageAdd(string UserId, string PassWord, string MessageTitle, string MessageDescription, DateTime MessageDate, AsyncCallback ac)
        {
            string FormattedDate = MessageDate.ToString("MM/dd/yyyy"); // String.Format("{0:MM/dd/yyyy}", MessageDate);
            string lurl = string.Format(LoginUrl, new object[]{ 
                UserId, PassWord, MessageTitle, MessageDescription, 
                FormattedDate });
            var wr = WebRequest.Create(lurl) as HttpWebRequest;
...............        } 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120606/27f0a9e6/attachment-0001.html>


More information about the Monodroid mailing list