This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Basically, it's saying if the difference between the start and end date is 0, change it to 1. Otherwise, just take the difference in the days. Note here I'm assuming your input looks just like you showed in your original post with mm/dd/yy. In this case, you need to use the DateTimeParse function to change it to a date format before doing the subtraction with the DateTimeDiff.