Check to see if one string is Null or = to another string

I have two arguments coming in that are strings the if condition is written
string.IsNullOrEmpty(in_Verity_Date) = in_EFF_Date but I get an error of no disallows implicit conversions

the in_verity_Date can have nulls or be empty the other argument will always have a date. What am I missing?

1 Like

Hey @jeff.shubzda

Try the below please,

String.IsNullOrEmpty(in_Verity_Date) or in_Verify_Date.Equals(in_EFF_Date)

Since you said it’s a date, better to convert it to date before comparison of the format is known



It should be like below.

     string.IsNullOrEmpty(in_Verity_Date) Or in_Verity_Date = in_EFF_Date
1 Like

@jeff.shubzda Try the below one


This returns true or false, boolean values.

This would only work if in_EFF_Date is boolean.

1 Like

This is close, but if in_Verity_Date and in_EFF_Date are strings, the comparison isn’t going to be reliable.

string.IsNullOrEmpty(in_Verity_Date) Or datetime.Parse(in_Verity_Date) = datetime.Parse(in_EFF_Date)

…will compare them as actual datetimes. This assumes both strings are in the system datetime format. If not, ParseExact would need to be used.

1 Like

Yes there are I converted them in the prior workflow

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