[mono-android] corruption on dates
Jonathan Pobst
monkey at jpobst.com
Sun Jan 8 12:39:07 EST 2012
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.ToString("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 at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
More information about the Monodroid
mailing list