How to use filter collection utility as i need to compare two dates.

Aditya B

New Member
Hi
please help. I am getting an error "Cannot compare unknown" while evaluating Filter Collection expression as given below:
[InputFileDetails.PTD]<=[Final date]

Collection field [InputFileDetails.PTD] is as Text (as shown in collection when opened) This is basically get filled from Excel when we read excel into collection
[Final Date] variable is data type as Date

Is this because collection field is defined as Text in excel? how can I compare this two dates in Filter collection?
 

Rich

Member
hi Aditya,

Yes the problem is that you're trying to perform a calculation 2 dates but one is a string/text.

On the basis you're using an undefined collection, the way around this would be to cast [InputFileDetails.PTD] to a data item in your process with a Date format:

create a data item e.g. [PTD as a Date] and give it the data type of Date. Then create a calculation stage and specify [InputFileDetails.PTD] as the expression and your new data item as the output.

then you'll need to update the expression above so its along the lines of:

[PTD as a Date]<=[Final date]

Hope this helps.
Rich
 
Top