Pergunta

Hi have list of dates I need to get name where the maximum date is there.

In oData Service there is function maxdatetime(). I used like this

url/services/List?$format=json&$select=name&$filter=date+eq+maxdatetime()

But it is showing exception

{"odata.error":{"code":"","message":{"lang":"en-US","value":"An unknown function with name 'maxdatetime' was found. This may also be a key lookup on a navigation property, which is not allowed."}}}

How can I solve this ?

Foi útil?

Solução

Function maxdatetime() should be implemented by service code. According to your exception, the service does not implement it. If you have right to change server side code, you can try to implement. Otherwise, Try:

RootUrl/List$filter=date eq 9999-12-31T11:59:59-00:00
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top