How we can calculate only Working days only Monday to Friday and skip Saturday and Sunday
Which time zone do you define the weekdays based on?
I suspect indexing the weekday (as per your definition/time zone) into a separate field at index time and then filter on this would be the by far most performant and scalable method. It may also be possible to create a runtime field to do this, but I would expect this to be slower.
We need to calculate the days based on the Created date which is available under index mapping.
could you please provide the script for the runtime field?
Are you determining weekday boundaries based on UTC time?
Note that 2023-06-13T02:00:00.000Z is a Tuesday in UTC time but a Monday in the US while 023-06-13T22:00:00.000Z is a Tuesday in UTC time but a Wednesday in India, so time zone considered does matter.
I am not even sure it is possible, so would leave that to someone with more date/timestamp scripting experience.
Can we calculate with working Days through UTC time zone?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.