ID,SUBTYPE,STN,LOC,ENTRY_TIME,EXIT_TIME
901203311,ADL,82,27,2019-04-01 18:15:05,2019-04-01 18:29:00
The above is part of the csv file that I have. The entry_time and exit_time columns are currently in string format. I tried to use the following code:
mongoimport --db db_name --collection col_name --type csv --columnsHaveTypes --fields "ID.string(),SUBTYPE.string(),STN.int32(),LOC.int32(),ENTRY_TIME.date(2019-04-01 18:15:05),EXIT_TIME.date(2019-04-01 18:15:05)"
but saw the following error
Failed: type coercion failure in document #1 for column 'ENTRY_TIME', could not parse token '2019-04-01 18:15:05' to type date
2022-03-10T15:18:11.752+0800
Is there any wrong with my code?