Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a field which has all the month names arranged in almost alphabetical order .how to change it to the order starting from Jan to Dec?? CAn anyone please help me out??
Regards,
Sahana
You just need to remove the [] around xbasedelivmonth
Hi,
In script try like this
LOAD
*,
Dual(xbasedelivmonth, Match(xbasedelivmonth, 'JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY', 'JUNE', 'JULY', 'AUGUST', 'SEPTEMBER', 'OCTOBER', 'NOVEMBER', 'DECEMBER')) AS Month
FROM DataSource;
Now in Chart/List box Select Numeric in Sort tab.
Hope this helps you.
Regards,
Jagan.
Hi Ruhan,
thanks it worked,but the ranks are shown ,how do I get the month names.
eg: if you see sheet 5 in my file attached file how do I pull the rearranged names?? like in my list box delivery details I want the months to be present in the Jan to Dec order... how to do it??Please help.
Write this in that list box properties-->sort tab-->expression
match(xbasedelivmonth,'JANUARY','FEBRUARY','MARCH','APRIL','MAY','JUNE','JULY','AUGUST','SEPTEMBER','OCTOBER','NOVEMBER','DECEMBER')
Ouch!!! It hurts to see that so many people suggest an inline table to solve this problem...
An inline table will work, but it is a clumsy method. It is much better to interpret the month name so that it gets a dual format that automatically gets sorted correctly . Here's how you should do it:
First, make sure that you have the environment variables in the beginning of the script:
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames= 'JANUARY;FEBRUARY;MARCH;APRIL;MAY;JUNE;JULY;AUGUST;SEPTEMBER;OCTOBER;NOVEMBER;DECEMBER';
Then, you can just use the following to interpret the month names. MMM means short month names, MMMM means long month names.
Month(Date#(Month,'MMMM')) as Month
No inline table is needed.
HIC
Thanks a lot all of you for helping me out.
new learning for me.