Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2082

Mongoimport cannot accept dates with meridian format

    • Type: Icon: Question Question
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.6
    • Component/s: mongoimport

      Hello!

      I am trying to import a CSV file from a prospect, they are moving data from Oracle 12c and  export a dataset with following dates using meridian format.

      Some example dates are:

      29/07/2017 09:18:39 a.m.

      01/08/2017 10:27:49 a.m.

      01/08/2017 09:20:39 p.m.

      I have tried to import it using mongoimport with .date_oracle, with several formats and none is working: 

      FECHA_APERTURA.date_oracle(DD/MM/YYYY HH:MI:SS AM)

      FECHA_APERTURA.date_oracle(DD/MM/YYYY HH12:MI:SS)

      FECHA_APERTURA.date_oracle(DD/MM/YYYY HH12:MI:SS AM)

      If I run it, then I get following error message:

      Failed: type coercion failure in document #0 for column ‘FECHA_APERTURA’, could not parse token ‘29/07/2017 09:18:39 a.m.’ to type date_oracle

      I am using MongoDB 3.6.6 Enterprise Advanced on Mac OS Sierra (10.12.6)

      What am I doing wrong? Is this format supported?

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            alejandro.mancilla@mongodb.com Alejandro Mancilla
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: