Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team I am looking for a solution, I currently want to do count from 2 date fields with different months,
here is the formula I'm using,
count(" To Date" - " From Date")
I am getting the correct count when the "To date" are on same month from "From date", but when months are different for instance count('2022-09-02' - '2022-08-31') should give us 3, not 2.
please assist. thanks in advance!
The NetWorkDays function is worth checking out.
NetWorkDays ("To Date", " From Date") as [Days Taken during the week]
@BrunPierre the networtkDays function i have used to get the during, and it works correct, now the issue is the total days taken including weekends on the different months, please look at my attachment.
Hope you can assist there.
simply subtracting the two dates will return difference in days and adding +1 is sufficient as dates are just numbers
" To Date" - " From Date" + 1 as DateDiff
Also COUNT() as you are using will always return 1 and is incorrect,
Your count() might actually be returning the no of rows for that record and not the difference in days
Hi,
Try this expression -
count(floor(Date#("To Date") - Date#("From Date"))) + 1
Regards,
SK