Get the number of days between two dates

How to calculate the number of days between two dates?

1 Like

@Royal

Welcome to our uipath community.

Do you want to calculate no. of business days ? If yes then check below thread.

https://go.uipath.com/component/calculate-business-working-days-2e41c4

1 Like

You can use the following expression -

intTotalDays = (EndDate - StartDate).TotalDays

EndDate, StartDate are DateTime variables.

Regards,
Karthik Byggari

5 Likes

Hi @lakshman

I just want number of days. Not only working days.

1 Like

@Royal

Then you can try above expression mentioned by @KarthikByggari

1 Like

Okay.

1 Like

Hi @KarthikByggari
Your solution is working. Thank you.

1 Like

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