Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone!
I have received a data set that has a date format of 'DD/MM/YYYY'. Is there any way to transfer it to display months and quarters separately? For example, I want to have a list box that will show 'Sept', 'Oct', etc and same for quarters, and be functional.
Thank you,
Anna
you can try something like below in the script and create a month field
MONTHMAPPING:
Mapping LOAD * INLINE
[ Name,number
Jan,1
Feb,2
Mar,3
Apr,4
May,5
Jun,6
Jul,7
Aug,8
Sep,9
Oct,10
Nov,11
Dec,12
];
ApplyMap('MONTHMAPPING', Month(Date(DateField, 'DD/MM/YYYY'))) AS Month
You can create new fields using the date field:
load
MyDate,
month(MyDate) as Month
'Q' & ceil(month(MyDate)/3) as Quarter
...other fields...
from ...somewhere...;
you can try something like below in the script and create a month field
MONTHMAPPING:
Mapping LOAD * INLINE
[ Name,number
Jan,1
Feb,2
Mar,3
Apr,4
May,5
Jun,6
Jul,7
Aug,8
Sep,9
Oct,10
Nov,11
Dec,12
];
ApplyMap('MONTHMAPPING', Month(Date(DateField, 'DD/MM/YYYY'))) AS Month
Month function will just return number I guess. we need a map as below
Thank you! it works:)
Thank you!