Tuesday
I have a collection like below and need to filter the rows that FieldB>FieldA. Tried using filter collection with expression:Convert([FieldB],'System.DateTime')>Convert([FieldA],'System.DateTime'), but doesn't work. However, if change the expression to Convert([FieldB],'System.DateTime')>'2025/10/1', then it works.
Would anyone kindly help on this? Thanks
Wednesday
@EmmaZRY ,
I was going to wait to see if anyone else posted, but...
I had a few minutes yesterday and created a quick version of your sample. And... it worked fine. I had never used the 'Convert' statement nor the '<' or '>' evaluation logic in my filter text, so I was happily surprised on two fronts.
That said, my first couple of iterations used one of the date formats that I am used to (MM/dd/yyyy), and in trying to zero in on your exact examples I had a couple of errors, usually where I reversed the intended month and day values. So, I don't have a direct answer to your question except that possibly the presented values do not align with your system's Date/DateTime localization.
But, never let it be said I just stop at the simple answer...
Since this is only for evaluation purposes, at this point in your process, and you are not actually committing the formatting change, why not try more precisely hardcode the filter logic? In my mind it would read "Convert([FieldB],'yyyy-d-M')>Convert([FieldA],'yyyy-d-M')". I would not expect to see any difference, honestly, but maybe the error would be more enlightening.
That is all I have at the moment.
Best of luck,
Red
yesterday
Thanks a lot for your kind responds! It works fine now with your suggestions.