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
Thanks
#nK
lakshman
(Ganta lakshman)
April 12, 2022, 5:57pm
3
@jeff.shubzda
It should be like below.
string.IsNullOrEmpty(in_Verity_Date) Or in_Verity_Date = in_EFF_Date
1 Like
ushu
(Usha kiranmai)
April 12, 2022, 6:07pm
4
@jeff.shubzda Try the below one
string.IsNullOrEmpty(in_Verity_Date).equals(in_EFF_Date)
postwick
(Paul Ostwick)
April 12, 2022, 6:08pm
5
This returns true or false, boolean values.
postwick
(Paul Ostwick)
April 12, 2022, 6:09pm
6
This would only work if in_EFF_Date is boolean.
1 Like
postwick
(Paul Ostwick)
April 12, 2022, 6:15pm
7
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
system
(system)
Closed
April 15, 2022, 6:40pm
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.