Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
This may be a very stupid question, but can somebody tell me how i use the 'Number interpretation variables'.
On load i am setting a system variable call 'LongMonthNames'. If i have a date '02/06/2012' how can i use 'LongMonthNames' to return June.
I have attached a file with Months 1 to 12 so you can see what i mean.
LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
Cheers
Robbie
Robbie,
All the functions seem to use the format as defiend in MonthNames eg if you change your script to:
load Month,
month(Month) as monthname;
LOAD * INLINE [
Month
1
2
3
4
5
6
7
8
9
10
11
12
];
It will return 'Jan' 'Feb' etc. The LongMonthNames only seems to have a value when formatting a date (MMM returns eg 'Jan' whereas 'MMMM' returns 'January'.
Easiest way I know is to just change the definition of MonthNames:
SET MonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
Regards,
Gordon
Robbie,
All the functions seem to use the format as defiend in MonthNames eg if you change your script to:
load Month,
month(Month) as monthname;
LOAD * INLINE [
Month
1
2
3
4
5
6
7
8
9
10
11
12
];
It will return 'Jan' 'Feb' etc. The LongMonthNames only seems to have a value when formatting a date (MMM returns eg 'Jan' whereas 'MMMM' returns 'January'.
Easiest way I know is to just change the definition of MonthNames:
SET MonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
Regards,
Gordon
Hi Robbie,
The values will be used in the Date format function when you use MMMM:
Load Dual(Text(Date(MakeDate(2012, Month), 'MMMM')), Month) As Month;
LOAD * INLINE [
Month
1
2
3
4
5
6
7
8
9
10
11
12
];
Regards,
Stephen
Thanks guys, that makes sense now!!