Hi
Use a ASSIGN activity and mention the input date to it named str_input
Now use a FOR EACH ROW loop and mention the quarter datatable as input
And inside the loop use expression and be like this in Assign activity str_output = IF(Datetime.ParseExact(str_input.Tostring.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture)>DateTime.ParseExact(“row(“StartDate”).ToString.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture) AND Datetime.ParseExact(str_input.Tostring.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture)<DateTime.ParseExact(“row(“EndDate”).ToString.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture), row(0).ToString,Str_output)
Where str_output is a string variable with default value as string.empty defined in the variable panel
Hello @Sweety_Girl
you can use a simple for each row or linq here btw the quarter for this input 3/13/2019 should be one right as it comes in between 1 1/1/2019 3/31/2019 this date ?
The expression be like this str_output = IF(Datetime.ParseExact(str_input.Tostring.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture)>DateTime.ParseExact(“row(“StartDate”).ToString.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture)
AND
Datetime.ParseExact(str_input.Tostring.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture)<DateTime.ParseExact(“row(“EndDate”).ToString.replace(“/“,””).Replace(“-“,””),”ddMMyyyy”, System.Globalization.CultureInfo.InvariantCulture),
row(0).ToString, Str_output)
Hello @Sweety_Girl
I tested this date and its working fine make sure there is no invalid characters or spaces in your string use .trim method before processing it