web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

OData filter query

(0) ShareShare
ReportReport
Posted on by

hi everyone - i am trying to figure out how to apply filter to OData call based on a date field. I am using the below to get all the data from purchase order lines where CONFIRMEDDELIVERYDATE  >= today's date but i am getting "bad data request" error.

any idea how to get this to work?

xyzxyzxyzxyx.ax.dynamics.com/.../PurchaseOrderLines$filter=CONFIRMEDDELIVERYDATE ge now()&cross-company=true

*This post is locked for comments

I have the same question (0)
  • add Profile Picture
    on at

    Hello SnowShine,

    I think that the function Now() is not supported. I tried this filter and it works:

    ?$filter=ConfirmedDeliveryDate gt 2017-01-01

    But when I try to use now() it shows this error:

    Unknown function 'now'.

    Note that field names are case sensitive and there is no need for quotes ('') on the date.

  • SnowShine Profile Picture
    on at

    thank you add - how do i use a dynamic date in there such as today's date?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 10

#2
Harisgillani Profile Picture

Harisgillani 4

#2
dserp Profile Picture

dserp 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans