Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Importing Error with Date

Keith Halter   ( User )

Commented 3 years ago

On the newest version, 2.0.26 while trying to import payments or revenue I get the following error:

ErrorException
HTTP 500 Internal Server Error
A non well formed numeric value encountered

It seems to be pointing to this area of the code:
Date::excelToDateTimeObject('2020-04-21')
in /var/www/html/app/Abstracts/Import.php (line 48)

$row[$date_field] = Date::parse(ExcelDate::excelToDateTimeObject($row[$date_field]))->format('Y-m-d H:i:s');

The imports worked fine on an older version, and I'm using the same excel file with the same information.

Leonardo Gomes   ( User )

Commented 3 years ago

Hello Keith.

Not sure if what i will suggest will work, However the code suggest to pass a Time to..
Can you try import something like '2020-04-21 00:00:00' and share with us?

Thanks

Keith Halter   ( User )

Commented 3 years ago

I've tried that, and it does not work either. :/

Denis Dulici   ( Admin )

Commented 3 years ago

In the new version, the date fields are not just text but Excel date fields so you use the date picker.

Feel free to download the new sample file and edit it.

Keith Halter   ( User )

Commented 3 years ago

I don't know what the deal is with this importing not working all of a sudden.
I've downloaded the sample file, and the first line will import, but no other lines will. I've even copied and pasted the date, but I'm still having issues. I've formatted the cell in excel to match the first a1 cell, but it's not working.

Keith Halter   ( User )

Commented 3 years ago

Ok, I think I might have figured it out. Import does NOT have to be in the format of YYYY-MM-DD, it can be in the format of 1/5/2020.
Also the currentcy_code is CASE SPECIFIC it appears.

Please login or register to leave a response.

Showing 1 to 6 of 6 discussions