Yes I've come across it before and it has indeed been just a debugger
irritation
But the issue on this occasion is that my conversions
Myclass.indepdate.ToString("yyyy-MM-dd")
Are delivering an empty string 
I have changed the code to place the month year and day into int variables
then constructed my own string format 
This works 


-----Original Message-----
From: Jonathan Pobst [mailto:mon...@jpobst.com] 
Sent: 08 January 2012 17:39
To: j...@murray.gb.com; Discussions related to Mono for Android
Subject: Re: [mono-android] corruption on dates

The DateTime corruption should just be a display bug for the debugger. 
If you expand the DateTime variable, you should see that all the integer 
values of the DateTime are correct, like Day, Month, Hour, etc.

Jonathan

On 1/8/2012 6:13 AM, John Murray wrote:
> I have a static date field
>
> e.g
>
> public static DateTime Myclass.indepdate =DateTime.Now
>
> I am passing into another method which constructs and executes an SQL
> string
>
> I convert the datetime on passing the parameter to the method thus
>
>
MyOtherclass.checklogbookforGAR(this,Myclass.aircraftreg,Myclass.indepdate.T
oString("yyyy-MM-dd"));
>
> When one checks what string turns up in the sql after these parameters
> are passed it is blank
>
> Before calling the method MyClass.indepdate seems to have the correct
> date in it
>
> I cannot check the conversion Myclass.indepdate.ToString("yyyy-MM-dd")
>
> Because VS2010 debugger just reports a load of Chinese characters - you
> can tell the correct date is in there by drilling down in the debugger
> to see Myclass.indepdate.month and .year etc but one cannot get a result
> from the above conversion
>
> Am I doing something wrong with my declarations or is this a peculiarity
> of statics or of VS2010
>
> I have noticed before that the debugger has some difficulty with
> converting datetimes on the fly but previously when I've notcided this
> the date conversion gets done properly when the code runs - here the
> conversion is delivering a blank string
>
> Any ideas anyone?
>
> John Murray
>
>
>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid


_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to