Click here to Skip to main content
15,886,052 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody,

I'd been trying to find a way to get the info from the last month on of an OData Feed. I know how to get it if a write the specific date but I need the expression to detect by itself the last month of the actual month we are.

What I have tried:

So far I have this (...)/pwa/_api/projectdata/AssignmentTimephasedDataSet?$filter=TimeByDay ge datetime'2016-10-01' , but the last month I have to put it manually and I need an expression that calculate the last month by itself. Any suggestion if this is possible?

Regards,
Pablo
Posted
Updated 14-Nov-16 3:39am
v2
Comments
Valery Possoz 15-Nov-16 15:55pm    
Is it OData 4 or OData 3?
If it is OData4 you're in luck as there is a now() function, what you could do is something like month(TimeByDay) eq month(now())-1
Pabbock 16-Nov-16 10:09am    
Im using OData 3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900