This project is read-only.
1
Vote

Only works When System is set for English Dateformat

description

Hi,
I have a German Dateformat, and get a FormatException in this Line:
_LastBatch = Convert.ToDateTime(String.Format("{0}/{1} {2}", dr.Item(9).ToString.Substring(0, 5), Now.Year, _
                                                  dr.Item(9).ToString.Substring(6, dr.Item(9).ToString.Length - 6)))
 
Because The Date is expected to be in the Format yyyy.nn.dd HH:mm:ss.
Looking at the Code, I also wonder if this works if the Server uses a Non English Dateformat.
 
Try executing a 'Set DateFormat ...' before quering anything from the Database

comments

rwmnau wrote Sep 6, 2012 at 4:38 PM

Thanks for the report - I'm definitely parsing this value manually and assuming the date format, so i'll address this!

wrote Feb 2, 2013 at 6:40 AM