Tuesday, 27 May 2014

CRM 2011/ CRM 2013 OData Datetime Passing Parameter

To pass the date as parameter in oData filter, you can use this format:
filter=tfp_EffectiveFrom le datetime'2014-05-12T04:05:28Z'

To pass the date as parameter to filter using oData to get the data in between certain Date, for example : StartDate= < dateParam <= EndDate

You can use this :

filter=tfp_EffectiveFrom le datetime'2014-05-12T04:05:28Z'
and tfp_EffectiveTo ge datetime'2014-05-12T04:05:28Z'

Which is '2014-05-12T04:05:28Z' is the Dynamics Parameter

Please refer to this link :

http://msdn.microsoft.com/en-us/library/gg328025.aspx#BKMK_WorkingWithDates

No comments:

Post a Comment

My Name is..