SQL Date in Table Transformer

Leona May 31, 2022

Hi,

A simple SQL in Table Transformer, but nothing is returned.

SELECT T1.'Status', T1.'Due'
FROM T1
WHERE T1.'Resolution' = "Unresolved"
AND T1.'Due' > 2022-05-30

Macro Settings Date format is set to yy-mm-dd (see screenshot)

What am I missing? Thanks.date.png

1 answer

1 accepted

3 votes
Answer accepted
Katerina Kovriga _Stiltsoft_
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.
June 1, 2022

Hi @Leona ,

Try to use double quotes for your date:

Wed 15-1.png

SELECT T1.'Due', T1.'Resolution'
FROM T1
WHERE T1.'Resolution' = "Unresolved"
AND T1.'Due' > "2022-05-30"

Wed 15-2.png

Hope this helps.

Leona June 1, 2022

Hi @Katerina Kovriga _Stiltsoft_ 

Thank you for replying. With the code below, I receive

SELECT T1.'Status', T1.'Due'
FROM T1
WHERE T1.'Resolution' = "Unresolved"
AND T1.'Due' > "2022-05-30"
ORDER BY T1.'Due' DESC

 

Something weird, for setting with yy-mm-dd, no results. All other date settings, I get result but wrong.

dates.png

Katerina Kovriga _Stiltsoft_
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.
June 1, 2022

The date format should correspond the format that you have in your table and in your query (see my example).

I have "yy-mm-dd" format in three places:

  • the Table Transformer macro settings
  • the "Due" column
  • the date for comparison that is "2022-05-30"

For your case, as your dates come from Jira, choose the "M dd, yy" in the Table Transformer macro and change the date for comparison as "May 30, 2022".

Then everything should work correctly.

Leona June 1, 2022

@Katerina Kovriga _Stiltsoft_ I changed the setting to "M dd, yy" and it works!!! Thank you so much! 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events