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

Mongoimport cannot accept dates with meridian format

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Accepted
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.6.6
    • Fix Version/s: None
    • Component/s: mongoimport
    • Labels:

      Description

      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?

       

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: