Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,773
Community Members
 
Community Events
176
Community Groups

Need the name of the month to appear?

Edited

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.

 

1 answer

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.

Tue 10-1.pngTue 10-2.png
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)

Tue 10-3.png

Hope this helps your case.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events