title: MongoDB Find | Exception - is not supported
body: <p>I have a MongoDB database, and in it I store dates in Unix format.</p>
  
  <p>But when I try to make a Find and implement a filter in it, it gives me an error.</p>
  
  <pre><code>FromUnixTimeSeconds({ViewsToday.Date}).ToString("MM/dd/yyyy") is not supported.
     at MongoDB.Driver.Linq.Translators.PredicateTranslator.GetFieldExpression(Expression expression)
     at MongoDB.Driver.Linq.Translators.PredicateTranslator.TranslateComparison(Expression variableExpression, ExpressionType operatorType, ConstantExpression constantExpression)
     at MongoDB.Driver.Linq.Translators.PredicateTranslator.Translate(Expression node)
     at MongoDB.Driver.Linq.Translators.PredicateTranslator.TranslateAndAlso(BinaryExpression node)
     at MongoDB.Driver.Linq.Translators.PredicateTranslator.Translate(Expression node)
     at MongoDB.Driver.Linq.Translators.PredicateTranslator.Translate(Expression node, IBsonSerializerRegistry serializerRegistry)
     at MongoDB.Driver.MongoCollectionImpl`1.CreateFindOperation[TProjection](FilterDefinition`1 filter, FindOptions`2 options)
     at MongoDB.Driver.MongoCollectionImpl`1.FindAsync[TProjection](IClientSessionHandle session, FilterDefinition`1 filter, FindOptions`2 options, CancellationToken cancellationToken)
     at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSessionAsync[TResult](Func`2 funcAsync, CancellationToken cancellationToken)
     at MongoDB.Driver.IAsyncCursorSourceExtensions.ToListAsync[TDocument](IAsyncCursorSource`1 source, CancellationToken cancellationToken)
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>    var results = await Settings.DataBase.GetCollection&lt;Video&gt;("Videos")
          .Find(x =&gt; x.ViewsToday != null &amp;&amp; DateTimeOffset.FromUnixTimeSeconds(x.ViewsToday.Date).ToString("MM/dd/yyyy") == DateTime.UtcNow.ToString("MM/dd/yyyy"))
              .ToListAsync();
  </code></pre>