How put date in the CSV planting file and not get Row 1: [log]: timestamp.0.value=This value should be a valid number.||timestamp.0.value=This value should be of the correct primitive type

Hello,

This software is just what I was looking for. I’m looking forward to the planning features. Is there a FAQ on how to resolve this problem? How to put the date in a CVS planting log and not get “Row 1: [log]: timestamp.0.value=This value should be a valid number.||timestamp.0.value=This value should be of the correct primitive type.” error? I’m lost, tried regular dates, and copied a date from an export file, but still no luck.

jgm48

1 Like

Glad to hear it @jgm48! And welcome to the forum! :smile:

Hmm. What did the dates you tried look like?

Can you try YYYY-MM-DD format (eg: 2024-02-27). I’ve used that recently so I know it works.

Technically speaking, the CSV log importers use the PHP strtotime() function, which claims to “parse about any English textual datetime description into a Unix timestamp”. But I haven’t tested it extensively with different formats.

Mike,
Thanks for your speedy reply. I logged out, cleared the browser, entered 2024-02-26 formatted it as text, then formatted it as number. I still get an error "

  • Row 1: [log]: timestamp.0.value=This value should be a valid number.||timestamp.0.value=This value should be of the correct primitive type.
    " . I’ve attached my CSV, possible you can spot the problem. No worries this is a test file.

Thanks,

  • John

(Attachment some_plantings_v4.csv is missing)some_plantings_v4.csv

1 Like

@jgm48 I created a test CSV file for importing an activity log. Can you go to Setup > Import > CSV Import > Log: Activity and try importing it? (You can delete the log it creates afterwards.) I tested this in another farmOS and it worked for me. Maybe we can figure out what the difference is with yours. If you are able to create a simple CSV file that exhibits the issue (without any personal information) and attach it here, I can try testing with it to see if I can debug what’s happening.

csv_log–activity–test.csv (180 Bytes)

Oh just realized you tried to attach a file before. I don’t think that works via email. Can you go to the forum website and attach it to the thread there?

Mike,

I put a link in the post. The file you sent worked in activity ok., but the same text still has an error in seeding. I’ve got to be away for a few hours, will try this evening.

  • John
1 Like

Ah! I see what the problem is. You’re going to laugh…

Your column is called “timestanp” with an “n” instead of “m”. :smile:

The other column names look good I think. When in doubt, you can click “Download template” to get a fresh CSV file with correct column names.

Hope that helps!

1 Like

All smiles here! Thanks a bunch, that did it.

1 Like