How to sort Column Heading in a XTab

wem3rd

Registered User.
Local time
Yesterday, 16:59
Joined
May 4, 2014
Messages
13
The column heading is a Date expression and I would like the resulting table to sort January, February etc. by using the expression below:

MonthName(Format([dte],"mm"))

Query sorting just by Format alone is OK, but alphabetical sorting happens once I use the MonthName function.

Bummer!

Thanks for your thoughts or tips on this.

wem3rd
 
Last edited:
Edit: Check out this first.

The MonthName function produces a string result like January, February which when sort would put April first. I think you want to to use the Month function, i.e, as column with the expression Month([dte]) and sort on that. The Month function produces a numeric output (January = 1, December = 12) which would be better to sort on.
 
Last edited:
I see now that the Format function eliminates the need to use MonthName() at all, and correct sorting of date headings is achieved just by using Format([Date],"mmm") and the Column Headings property!

Thank you

wem3rd
 

Users who are viewing this thread

Back
Top Bottom