UK date attribute issue
Hi,
I have a date field in a feature layer which holds dates in the UK format (d/m/y). The date is currently captured as a string via a user form, validated by a regular expression, and then converted into a UK date type using DateTime.Parse(strDate,cultureInfo).ToLocalTime(), where strDate is the date string and cultureInfo = New System.Globalization.CultureInfo("en-GB").
I'm not using a date picker on the form as the date needs to be optional, which as far as I am aware is not yet supported (I'm running Essentials 3.15.1 / SL viewer 1.10.1) The dates are storing fine in the geodatabase, as verified with ArcMap.
However, it appears that in-place attribute editing isn't handling UK dates properly. For example:
- "12/01/2014" is being stored correctly in the geodatabase as Jan 12th, and I can edit the date in the attribute window which appears as '12/1/2014'.
- "13/01/2014" is also being stored correctly in the geodatabase as Jan 13th, however I cannot edit the date in the attribute window which appears as '13/01/2014'.
So it seems that the Geocortex attribute window is applying US/Canadian(?) date fomatting regardless and hence considers 13/01/14 to be invalid, whilst accepting 12/01/14 as being valid, presumably as Dec 1st?
I've also tried converting the date using DateTime.ParseExact(strDate,"dd/MM/yyyy",cultureInfo).ToLocalTime() and DateTime.ParseExact(strDate,"d/M/yy",cultureInfo).ToLocalTime(). CDate(strDate) doesn't work properly as due to daylight savings is actually storing "15/08/2014" as '14/08/2014 23:00:00'!
Have any other British users of Geocortex encountered this? How did you fix it? Is it worth raising this as a bug?
Cheers
-
From reading other threads in this forum, it appears that Australian users are having similar problems...
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar