Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16418

Add a way to convert a number or string value(s) to a date in $project

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None

      A very common data management pattern is to do ELT - e.g. extract data (e.g. from an RDBMS), load it (into MongoDB), and then transform it in MongoDB [with $out to another collection], instead of having to transform it in files or via ETL tools.

      The aggregation framework would be much better at this if it could convert dates (and other types in other JIRA tickets).

      One situation I worked on is taking a file with dates as numbers like 20140101 but it would also have been easy to put quotes around that in the files and use $substr to pull out the year, month, and day from "20140101" but there was no way to take those values and project it to a date value

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.kalan@mongodb.com Matt Kalan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: