How to compare Date input from excel

Hello members ,

Logic trying to achieve is .

I want to get current date and check the current date falls under which Cut off period column in excel and based on cutoff period date I want to display subsequent “Pay period” value in variable or assign value to input for my application

e.g Current date = 21/02/2023 so it will falls under “16/02/2023 to 28/02/2023” cutoff period and payperiod for that cutoff period is 102304
i want display 102304 .

Can you please help me resolve this logic , I tried some logic not able to proceed further .Let me know if anyone has solutions for this already .


1 Like

maybe a quick dirty approach:

Build from date the Paymonth string
Filter / Lookup on Paymonth string
Return Payperiod

As from first - 15 Semi = 1
From 16 tile end of month Semi = 2

We can do:

Other example:

String.Format("{0} SEMI-{1}",myDate.ToString("MMM"), If(myDate.Day <= 15,"1","2"))

Can you please explain more about implementation steps .

As an alternate when our understanding of the Payperiod is right we can generate it by:

And also for the next year:

String.Format("10{0}{1}" ,myDate.toString("yy"), ((myDate.Month * 2) - Convert.ToInt32(myDate.Day <= 15)).ToString("D2"))

Getting special character at end of the values . Please suggest

screenshots from above were done within UiPath:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

please share with us your implementation details. Thanks

Can I use data table to get those value instead of excel sheet ? Will it solve the issue