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

LINQ does not support DateTime comparisons

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.1
    • Affects Version/s: 1.4
    • Component/s: None

      Following exception occurs when applying a comparison operator on a field of type DateTime:

      Unsupported where clause: (DateTime:(2012-04-03T12:45:32.5348776Z) < s.CreatedOn)

      The query is as follows:

      .Where(s => DateTime.UtcNow < s.ExpireOn)

      Note: This is supported by FluentMongo

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            zaidmasud Zaid Masud
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: