I’m upgrading my code to use ThinkGeo v12.3.2. I’ve hit a snag with a date field in a FileGeoDatabase. This code worked fine previously but now it is not returning a value that I can turn into a date. What options do I have to get a correct date value?
Here is the code:
String sourceGDB = “F:\Temp1\Alabama.gdb”;
String gdbTable = “Alabama”;
FileGeoDatabaseFeatureLayer fileLayer = new FileGeoDatabaseFeatureLayer(sourceGDB);
fileLayer.ActiveLayer = gdbTable;
fileLayer.Open();
Collection features = fileLayer.FeatureSource.GetAllFeatures(ReturningColumnsType.AllColumns);
foreach (Feature tempFeature in features)
{
AreaBaseShape tempShape = (AreaBaseShape)tempFeature.GetShape()
Dictionary<String, String> tempColValue = tempFeature.ColumnValues;
When I look at what is in the dictionary the date columns are not right. They look like this:
Name | Value | Type | |
---|---|---|---|
◢ | [11] | {[creation_date, %d-%d-%d-%d-%d-%d]} | System.Collections.Generic.KeyValuePair<string, string> |
Key | “creation_date” | string | |
Value | “%d-%d-%d-%d-%d-%d” | string | |
Non-Public members | |||
◢ | [12] | {[last_change_date, %d-%d-%d-%d-%d-%d]} | System.Collections.Generic.KeyValuePair<string, string> |
Key | “last_change_date” | string | |
Value | “%d-%d-%d-%d-%d-%d” | string | |
Non-Public members |
This is what the data looks like: