Count total days by selecting fromdate and todate

My requirement is for leave Application,

When i Select FromDate and ToDate i need to display total days in TotalDays property.

I used “@differenceBetweenDays(.ToDate,.FromDate,false,“d”)” .This function is not worked as expexted.

Help me on this.

Example:

FromDate : 23/01/2023

ToDate : 23/01/2023

Total Days :1

@Ganta

Try using below function

@DateTime.DateTimeDifference(Param.StartDateTime,Param.EndDateTime,“d”)

@Ganta

You have passed incorrect value to last parameter, please try configuring like below.

@differenceBetweenDays(.ToDate,.FromDate,false,“”)

@Ganta

@differenceBetweenDays(.ToDate,.FromDate,false,“Default”)

The last parameter is calendar.

see the below video for reference

@Satish Sudagoni Thank you