Skip to content

Commit

Permalink
Fix formats
Browse files Browse the repository at this point in the history
  • Loading branch information
vov4uk committed Jun 27, 2024
1 parent 2df7c5d commit 5464775
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Financier.Desktop/Helpers/MapperHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,9 @@ public static BankTransaction ToBankTransaction(Abank_Row item)
var cardCurrencyAmount = GetDouble(item.CardCurrencyAmount);

DateTime dt;
if (!DateTime.TryParseExact(item.Date,
"dd.MM.yyyy HH:mm:ss",
CultureInfo.InvariantCulture,
DateTimeStyles.None,
out dt))
{
DateTime.TryParseExact(item.Date,
"dd.MM.yyyy HH:mm",
CultureInfo.InvariantCulture,
DateTimeStyles.None,
out dt);
};

var formats = new[] { "dd.MM.yyyy H:mm:ss", "dd.MM.yyyy H:mm"};
DateTime.TryParseExact(item.Date, formats, CultureInfo.InvariantCulture, DateTimeStyles.None, out dt);

return new BankTransaction
{
Expand Down

0 comments on commit 5464775

Please sign in to comment.