Created
September 15, 2015 23:01
-
-
Save josephbales/b2f6d4b93113b6ae5ec5 to your computer and use it in GitHub Desktop.
Code that gets malformed dates from a from an ObdcDataReader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (reader.Read()) | |
{ | |
string line = ""; | |
for (int i = 0; i < fCount; i++) | |
{ | |
try | |
{ | |
line = line + reader[i].ToString().Trim().Replace("\n", "").Replace("\r", " ") + "\t"; | |
} | |
catch (Exception) | |
{ | |
line = line + reader.GetString(i).Trim().Replace("\n", "").Replace("\r", " ") + "\t"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment