Date comparison issue

Hello,

my scenario is that i am fetching date from sap application which is in dd.mm.yyyy format. i have to compare that with the system date which is in mm/dd/yyyy format. i have changed the format and it is working properly but for comparing i am using this expression - varValidThroughDate >= varSystemDateCorrection Or varValidThroughDate = Nothing .
in this case if the date is greater than or equal to system date then i have to follow a set of steps or if the date is empty then different set of steps. i used msg box to check the flow and i observed that the bot is unable to read the expression in the condition that i ahve provided. varValidThroughDate >= varSystemDateCorrection Or varValidThroughDate = Nothing. Please help me with this. How to check the condition correctly?

Thanks.

@mannu.1996.08 Can you tell us what are the data types of varValidThroughDate and varSystemDateCorrection ?

it is generic value @supermanPunch

@mannu.1996.08 You cannot compare date as Generic values, you would need to convert it to DateTime type

i have applied one more thing. i have trimmed the dates variable and then i am using this condition to check. now it is working. may be it was blank space issue. anyways i will check it for few more times.

@mannu.1996.08 Make sure the date variable are in DateTime type or else the end output that you may get may not be expected one. :sweat_smile: The Condition might work but the comparison might be wrong.

2 Likes

@supermanPunch. Sure. i will make the change then.

1 Like