The target date format is 11-Feb-2022.
But when I use this format, the date sorting is based on number and then alphabet (believing it is a string now) . Let me show you the picture.
I change the date format into d M yy in table edit page in setting and then it looks like the picture.
And one more thing : when the format is M - D -YYYY , there is 0 in front of some date cell, Please check the [Pre Date].
all data are from jira.
Here is the JQL
SELECT 'IMPORT',
FORMATWIKI(SUM('ITEM'+"\n")) AS 'Item',
FORMATWIKI(SUM( ’Date'+ "\n ")) as 'Date',
FORMATWIKI(sum('Pre Date'+"\n" )) as 'Pre Date',
FROM (
SELECT 'Import', 'Item' ,
FORMATDATE('Date') as 'Date',
FORMATDATE('Pre Date') as 'Pre Date'
FROM T* ORDER BY 'Item' , 'Date' ASC
) T1
GROUP BY 'Item'
HI Katerina,
I try to use the second Table Transformer but it doesn't work.
Here is the inside (The first one) Table and the Date format in settings is 'YYYY-MM-DD':
Here is the outside table transformer:--the result of date format is the same
and the date format in setting is d M yy (1 Apr 2022)
Another Try:
Set first table date format as d M yy
result : disorder sorting of Due Date
Continue to set second table date format as d M yy
result : disorder sorting of Due Date
Could you check which part I did wrong?
The Date format inside the first Table Transformer macro settings is the result format that comes from the FORMATDATE function that you use in the first query.
In the first question you said that the desired output is 11-Feb-2022, so use the dd-M-yyyy format twice.
The first variant uses two different formats: at first you change the date to the YYYY-MM-DD and then sort these dates as d M yy.
The second variant seems better and should be working fine.
I also paid attention that you try to sort several dates inside one cell - this may be the problem. The Table Transformer macro works with tables as with SQL databases, I mean with cells, not with aggregated pivot tables (in my example I used non-grouped table).
Try to format your data, then sort the dates when they are still in separate cells and then group the already sorted fields by something.
I see. let me try to sort the date first and then group them. Will give you feedback later. Thanks a lot
Hi Katerina
your suggestion of " to format data, then sort the dates when they are still in separate cells and then group the already sorted fields by something " works so well !
I am stuck in group them first.
Thank you so much !