You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I'm looking to have a table with one column of dates, another column of days and the 3rd column calculated by adding the two and excluding the weekends. Say if date Jan 1 falls on a Monday and i need to add 8 days, the resulting 3rd column will be Jan 10 (Wed the following week). I followed the following article but it is a straight days add.
Thanks in advance for your help
Hi @Fulbert Lato ,
You may try the following SQL query:
SELECT *,
FORMATDATE(DATEADD(day,
T1.'Period' +
2 * FLOOR(T1.'Period' / 5) +
CASE
WHEN 'Start Date'::Date->getDay() = 0 THEN 1
WHEN 'Start Date'::Date->getDay() = 6 THEN 2
WHEN ('Start Date'::Date->getDay()) + T1.'Period' % 5 > 5 THEN 2
ELSE 0
END,
T1.'Start Date'))
AS 'End Date'
FROM T1
The query counts the number of Saturdays and Sundays for your period plus checks if the Start Date belongs to the weekend and "extends" the period (i.e. moves the End Date further) for the calculated number of holidays.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.