Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4329

$dateDiff failing in Mongo2Go V3.1.3

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None

    Description

      Summary

      $dateDiff is failing with "Invalid $project :: caused by :: Unknown expression $dateDiff."

      Mongo Version

      V2.13

      Mongo2Go Version

      V3.1.3

      How to Reproduce

      Code use below works in practise but not when testing.

      {"duration", new BsonDocument 
                              {
                                  { "$dateDiff", new BsonDocument 
                                      {
                                          {"startDate", $"${nameof(State.Updated)}"},
                                          {"endDate", DateTime.Now},
                                          {"unit", "day"}
                                      }
                                  }
                              }
                          }

      Attachments

        Activity

          People

            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            isaac.williamson@paymentsense.com Isaac Williamson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: