You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am using the 'Edit Table Transformer' macro.
In SQL I know I can extract the month using SELECT *, MONTH('Due') AS 'Month',
However, it returns an integer value (i.e. '1' for month of January, '2' for February, etc.)
I want the result to actually list the month name (i.e., January, February, March, etc.)
I've been trying other workaround to no avail. i.e., FORMATDATE etc. I've also tried to do a WHEN-THEN-ELSE case that says if "1" then return 'January', but I could get that to work either.
Note: There are other columns of data that need to be left in the format like mm/dd/yy, so I don't want to change the format in the Settings tab and force a particular format across all the dates.
Hi @Laurie Huth,
Please follow these steps: go to the Table Transformer macro settings and set the required date format that corresponds to the format used in your source table.
Then use the following SQL query:
SELECT 'Date', 'Month',
CASE
WHEN 'Month' = 1 THEN "January"
WHEN 'Month' = 2 THEN "February"
WHEN 'Month' = 3 THEN "March"
WHEN 'Month' = 4 THEN "April"
WHEN 'Month' = 5 THEN "May"
WHEN 'Month' = 6 THEN "June"
WHEN 'Month' = 7 THEN "July"
WHEN 'Month' = 8 THEN "August"
WHEN 'Month' = 9 THEN "September"
WHEN 'Month' = 10 THEN "October"
WHEN 'Month' = 11 THEN "November"
WHEN 'Month' = 12 THEN "December"
END
AS 'Pretty Month Name'
FROM (
SELECT *,
MONTH('Date') AS 'Month'
FROM T1)
Hope this helps your case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.