I am running into the same issue from this post and replicated the same troubleshooting process of seeing that compass converts the date to a BSON date with 1970 unix epoch when not as a time series collection. But I get the same error the my data

However, I feel like I have triple checked my csv file for no extra spaces and cannot find any to eliminate. So I am not sure if I am missing something else.

Thanks,

Justin

I wanted to follow up that I have since tried explicitly converting my date to a BSON date type of milliseconds since UNIX epoch 1/1/1970. I then attempted to load this value via Mongodb compass as a Long and get the same error that repeats for each row of my file (truncated below)
{“name”:“MongoBulkWriteError”,“message”:“‘datetime’ must be present and contain a valid BSON UTC datetime value”,“code”:2,“numErrors”:252}
{“name”:“WriteConcernError”,“message”:“‘datetime’ must be present and contain a valid BSON UTC datetime value”,“index”:0,“code”:2}
{“name”:“WriteConcernError”,“message”:“‘datetime’ must be present and contain a valid BSON UTC datetime value”,“index”:1,“code”:2}
{“name”:“WriteConcernError”,“message”:“‘datetime’ must be present and contain a valid BSON UTC datetime value”,“index”:2,“code”:2}
{“name”:“WriteConcernError”,“message”:“‘datetime’ must be present and contain a valid BSON UTC datetime value”,“index”:3,“code”:2}
{“name”:“WriteConcernError”,“message”:“‘datetime’ must be present and contain a valid BSON UTC datetime value”,“index”:4,“code”:2}

Revised Dataset:
image

Thanks,

Justin

5 months later

Hi, did you get anywhere with this? I am having exactly the same problem trying to import JSON into a timeseries collection.

3 months later

If you guys are doing everything from MongoDB Compass like I was, then probably the critical mistake is the field, which you dedicated to be a timestamp when creating the collection.
As described here, while creating the collection you must specify the fieldname for the timestamp: https://www.mongodb.com/docs/compass/current/collections/time-series-collection/
Unfortunately after the creation this property is no longer visible (or at least I was not able to find it). If the the timestamp column in your input CSV file has a different label compared to what you have specified, Compass will complain with this error. It took me a while to figure this out and I confirmed it by creating a new collection. Hope it helps!