Could you confirm if the Date Encoded is already present in the excel or is it the Current date.
And please confirm the logic for the same,
as per your logic Date Encoded can be any day >=,<14(all days fall in this category))
Write In Excel =if DayDiff(Date Encoded,EffectivityDate)>=14 then Date Encoded
Write In excel =if DayDiff(Date Encoded,EffectivityDate) < 14 then Date Encoded
is there any other way to separate the condition like using “IF” activity?
because i have more condition statement after determining if the date encoded is < 14 days of Effectivity date or date Encode is >= 14 Days Effectivity Date
Please follow the below steps:
1.Read the excel
2.Build a datatable with same structure as the above excel dt.Clone
3.Loop through the extracted data, and put the condition to check the diff between the 2 columns to satisfy:
if DateDiff(DateInterval.Day,Date.ParseExact(“MM/dd/yyyy”,CurrentRow.Item(“Date Encoded”).ToString.Trim,System.Globalization.CultureInfo.InvariantCulture),Date.ParseExact(“MM/dd/yyyy”,CurrentRow.Item(“Effectivity Date”).ToString.Trim,System.Globalization.CultureInfo.InvariantCulture))
< or >= 14 then pass the row to add data row activity to the datatable built in step2
4.At the end write range the datatable of step 2 to the excel