Unable to understand why my if condition is failing

Hey Uipathians,

Following is an if condition that am using as part of a workflow

The condition that is being used is:
(Convert.Tostring(date_created_HS.Substring(0,10)).Equals(Convert.Tostring(date_created_CCHQ.Substring(0,10)))) or (date_created_HS <> “”)

The motto of this workflow is to extract values of date_created_HS and date_created_CCHQ from different systems and match them; it may be blank in the first system, which am checking with (date_created_HS <> “”)

But when am running it, the condition is running true even for the following dates:
image

It was running perfectly fine till a few days back but am noticing this discrepancy these days.
PS: I have not touched these conditions since many months now - so just wondering how/what is wrong.

Could anyone help me in diagnosing the fault am committing?

Thank you!

Hey,

Try with the following one,

(Convert.Tostring(date_created_HS.Substring(0,10).Trim).Equals(Convert.Tostring(date_created_CCHQ.Substring(0,10).Trim))) OR (string.IsNullorEmpty(date_created_HS.Trim))
3 Likes

Thanks @sarathi125 - this looks like working for me!
(Still wondering why my original condition stopped working as expected - all of a sudden!)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.