Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11175

Document how to project (aggregation) day/month/year from an ISODate field using the Java driver

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: drivers
    • Labels:
      None

      Please document how to project day/month/year from an ISODate field using the Java driver. The customer attached to this docs ticket had difficulty figuring out how to do this and so did I

      For example:

      Document project = Document.parse("{$project: {year: {$dateToString: {format: '%Y', date: '$Events.eventTime'}}}}");
      

      Thanks,
      Angela.

            Assignee:
            Unassigned Unassigned
            Reporter:
            angela.morgan Angela Morgan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 12 weeks, 1 day ago