$dateDiff failing in Mongo2Go V3.1.3

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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"}
                                      }
                                  }
                              }
                          }

            Assignee:
            Dmitry Lukyanov (Inactive)
            Reporter:
            Isaac Williamson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: