dickwolff / Export-To-Ghostfolio

Convert transaction history export from your favorite broker to a format that can be imported in Ghostfolio.
https://hub.docker.com/r/dickwolff/export-to-ghostfolio
Apache License 2.0
35 stars 8 forks source link

JSON not working if language does not match - date must be a valid ISO 8601 date string #3

Closed dascgit closed 10 months ago

dascgit commented 10 months ago

Hi

Since I can not respond to the old issue (https://github.com/dickwolff/DEGIRO-to-Ghostfolio/issues/1) I opened a new one here. It looks better now, but now something with the date doesn`t work.

Image: image

Example JSON output { "accountId": "9b6128be-97ff-4d53-a7b0-ef58413e307f", "comment": "", "fee": 0.29, "quantity": 1, "type": "DIVIDEND", "unitPrice": 1.93, "currency": "USD", "dataSource": "YAHOO", "date": "Invalid Date", "symbol": "A" }

dickwolff commented 10 months ago

Thanks! I will try to look in to it later this week!

dascgit commented 10 months ago

When adding this lines the date problem seems solved: import customParseFormat from 'dayjs/plugin/customParseFormat'

before import dayjs from "dayjs";

and then adding this line dayjs.extend(customParseFormat);

before of const date = dayjs(${record.date} ${record.time}:00, "DD-MM-YYYY HH:mm");

I am not a pro dev so I am not surfe if this solves the problem completely.

But no the next Problem is this here: image

Should I open a new Issue for this?

dickwolff commented 10 months ago

Yes please, I know there is another issue with the DEGIRO export and I was working yesterday on fixing it, probably related.

dascgit commented 10 months ago

Updated Ghostfolio now the Import works fine.

dickwolff commented 10 months ago

Great! So only the date issue has to be fixed in the tool now?

dickwolff commented 10 months ago

I've added this in #5