Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Plugin QueryExpression with daterange filter

$
0
0

CRM2016

I am reading an XML file which has a date string formatted as yyyy-mm-dd

I need to use a query expression to look up a record which has that date or date past 

ie if the datetsting is 2016-10-05 I need to return the record from the 05/10/2016 to current day

I have tried the following

                        filter4.AddCondition(

"new_submitteddate",ConditionOperator.GreaterEqual,DateTime.ParseExact(Right(strProcessingDate, 2) & "/"& Mid(strProcessingDate, 6, 2) & "/"& Left(strProcessingDate, 4), "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat))

but I get the error  String was not recognized as a valid DateTime.


Dont ask me .. i dont know



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>