WebApi icon indicating copy to clipboard operation
WebApi copied to clipboard

Support now()

Open MaxWilson opened this issue 11 years ago • 2 comments

Per oData v4 spec,

5.1.1.4.21 now The now function has the following signature: Edm.DateTimeOffset now() The now function returns the current point in time (date and time with time zone) as a DateTimeOffset value.

This doesn't seem to be supported in version 5.6 of oData.

Example: http://Example.com/ProductPrices?$count=true&$filter=SKU+eq+%274F3-00015%27+and+FutureEndDate+gt+now()

Result:

    {
      error: {
        code: "",
        message: "The query specified in the URI is not valid. Unknown function 'now'."
      }
    }

MaxWilson avatar Sep 16 '15 21:09 MaxWilson

Now() is not supported for now. Either use a service local now(), or find a Linq that EF can translate it into a SQL now.

congysu avatar Sep 23 '15 07:09 congysu

See #872

robward-ms avatar Jun 03 '17 00:06 robward-ms