Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have November, December, January as months in my data
but my req. is like Nov-13, Dec-13,Jan-14
as months (by default it should like that ), even i don't have year column
I have only month data i.e November, December, January
Is this possible?
Thanks & Regards,
Ankitha
Hi Antikha,
If you don't have a year column in your data, then if you have your input files identified by moths and years (filename) you can obtain this information using this (It will be better that you will use variables for the name of the file and for the date of the input file. Let's say you called your variable vYear for the year of the input files - the File name of the input file will be something like vFileName & vYear & vMonth)). Then you can try something like this:
Table:
LOAD .....,
Mid([Your Month Filed],1,3) & '-' & vYear as [New Month Field]
FROM ....;
Hope this helps,
Regards.
Jaime
Hi Ankitha,
You can show month's in 3 different formats (to my knowledge).
1. Number Format - 01, 02, 03.......
2. Short Text - Jan, Feb, Mar......
3. Long Text - January, February, March.....
To do this.....follow the steps.
You might be having only one field, Date or Year
Basically you need to extract month from the field.
month(Date, 'DD/MM/YYYY') as month -> will return month in Numeric format ->01,02,03...
month(Date, 'DD/MMM/YYYY') as month -> will return month in short text format -> Jan, Feb, Mar.....
Already you have month's in Long text, just extract month from the field
month(Date) as Month
I welcome all your comments and feedback.
Regards
Pavan...
Hi Ankitha,
If you have date field in script then try like this
LOAd
Date(DateFieldName, 'MMMM-YY') AS MonthYear
*
FROM DataSource;
Now use MonthYear as dimension.
Regards,
Jagan.