Week number and the next weeknumber using Table transformer

Chris August 13, 2024

Hello,

We want to display the current week number and the next week number in two rows of our table. I have understood that this may be possible using the table transformer macro. However, I am not sure what SQL Query to write for this. can someone help with this. Our aim is that the week number automatically updates itself in the column depending on the current week. We are on Confluence Data center.

Thanks

1 answer

1 accepted

3 votes
Answer accepted
Chris August 14, 2024

This is resolved. Please don't worry.

Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2024

Glad it works!

Maybe for other users if they come across this question: you may try the following SQL query

SELECT
FORMATDATE("today", "w") AS 'Current Week Number',
(FORMATDATE("today", "w"))::number+1 AS 'Next Week Number'
FROM T1

Wed 5-1.png

Hope it may help.

Like # people like this
Chris August 14, 2024

This was my solution. Not an expert at SQL queries, but worked something out after googling things:

SELECT FORMATDATE(GETDATE()) AS 'Current CW', FORMATDATE(DATEADD(week, 1, NOW())) AS 'Next CW' FROM T1;

 

Like Stiltsoft support likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events