Skip to content

Commit

Permalink
Merge pull request #21 from dynamicweb/mss/16536
Browse files Browse the repository at this point in the history
Changed TypeCast when source column is DateTime In GetStringToWrite s…
  • Loading branch information
MatthiasSort authored May 13, 2024
2 parents 27b0a07 + 6d95c96 commit 3fd7b2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/CSVDestinationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ private string GetStringToWrite(Dictionary<string, object> row, ColumnMapping co
}
else if (columnMapping.SourceColumn.Type == typeof(DateTime))
{
stringToWrite = ((DateTime)row[columnMapping.SourceColumn.Name]).ToString(
"dd-MM-yyyy HH:mm:ss:fff", CultureInfo.CurrentCulture);
stringToWrite = DateTime.Parse(row[columnMapping.SourceColumn.Name].ToString()).ToString("dd-MM-yyyy HH:mm:ss:fff", CultureInfo.InvariantCulture);
}
else if (cultureInfo != null && (columnMapping.SourceColumn.Type == typeof(int) ||
columnMapping.SourceColumn.Type == typeof(decimal) ||
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.0.8</Version>
<Version>10.0.9</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>CSV Provider</Title>
<Description>CSV Provider</Description>
Expand Down

0 comments on commit 3fd7b2b

Please sign in to comment.