Days Between Dates As Integer

Days Between Dates As Integer

Comments

  • [font=Calibri, sans-serif]I have two [/font][font=Calibri, sans-serif]dates[/font][font=Calibri, sans-serif] I need to compare and get the number of [/font][font=Calibri, sans-serif]days[/font][font=Calibri, sans-serif] [/font][font=Calibri, sans-serif]between[/font][font=Calibri, sans-serif] them. I can’[/font][font=Calibri, sans-serif]t[/font][font=Calibri, sans-serif] figure this out for some reason. I tried using the ‘Get Time Span [/font][font=Calibri, sans-serif]Between[/font][font=Calibri, sans-serif]’ step, but it returns an actual TimeSpan object. From there I can’[/font][font=Calibri, sans-serif]t[/font][font=Calibri, sans-serif] figure out how to convert a TimeSpan into an [/font][font=Calibri, sans-serif]Integer[/font][font=Calibri, sans-serif] representing the number of [/font][font=Calibri, sans-serif]days[/font][font=Calibri, sans-serif].[/font]

  • You are using the right Get Timespan Between step. This Step requires two Dates and outputs Timespan. You do not need to convert Timespan object because this Object contains Days property which is Int32 value of Days between two dates.

    Let us know if you need more assistance on this question from us.

  • That works. Silly me for missing, it was bringing back an object when the C# data type TimeSpan is an object.

    Next question. When comparing the two dates in this step, is there a way for the comparison to take Working Days into account with what it returns? I’d like to only get the number of working days between the two dates.

  • By default we dont factor in working days in the Timespan calculation. You can use our Date steps to build a process that will calculate the Timespan that will take into account what days are working days. If you need help getting started on building this out let us know and we can help think through the process.

  • [font=Calibri, sans-serif]I think we can handle this on our own. If not, I’ll reach back out. Thanks![/font]

Sign In or Register to comment.