Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, - I have three sets of data. In the first two sets the month is in character format for eg (JAN,FEB...etc) but in the third one its in numeric format like (01,02,03). I want to bring the format of the first two data sets like the third one ie in the numeric one. I tried the mapping function its not working. Its not synchronizing with the other two. Need help!- Thanks Anirban
Mapping is the obvious answer here so maybe you're doing it slightly wrong?
Map_Months:
MAPPING LOAD * INLINE [
In,Out
JAN,01
FEB,02
MAR,03
APR,04
etc
];
Data:
LOAD
Field1,
Field2,
Etc,
ApplyMap('Map_Months',TRIM(UPPER(Month))) AS Month
FROM....;
You can you use this in all three data loads as when the third one doesn't match any map values it will return the current value - which is correct in the third data set.
Hope this helps,
Jason
Mapping is the obvious answer here so maybe you're doing it slightly wrong?
Map_Months:
MAPPING LOAD * INLINE [
In,Out
JAN,01
FEB,02
MAR,03
APR,04
etc
];
Data:
LOAD
Field1,
Field2,
Etc,
ApplyMap('Map_Months',TRIM(UPPER(Month))) AS Month
FROM....;
You can you use this in all three data loads as when the third one doesn't match any map values it will return the current value - which is correct in the third data set.
Hope this helps,
Jason
Hi,
Use the Script like this
Date(Date,'MM') AS Month,
Hope its help
Iyyappan
You can also use following code:
=makedate(Year(DateOrder), num(month(DateOrder)),day(DateOrder))