[mono-android] corruption on dates
John Murray
john at murray.gb.com
Sun Jan 8 07:13:19 EST 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodroid/attachments/20120108/3c77fe7e/attachment-0001.html
More information about the Monodroid
mailing list