Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two fields like month,and year
Month | Year |
---|---|
3 | 2015 |
4 | 2015 |
5 | 2015 |
6 | 2015 |
7 | 2015 |
i want to display monthyear in List box
like Monthyear:2015-03,2015-04,-----2015-07
How to achive this?
regards,
kd
You can either modify your load script to assemble the field as
Year & '-' & Num(Month,'00')
Or use this as a calculated dimension
Hi,
Add the Field in Script like below.
Load *,Date(Date,'YYYY-MM') as YearMonth;
Load *,MakeDate(Year,Month) as Date;
LOAD * INLINE [
Month, Year
3, 2015
4, 2015
5, 2015
6, 2015
7, 2015
];
If you want it in date DataType, so you can use date functions if needed:
Date(MakeDate(Year, Month), 'YYYY-MM')
Hi Koti,
Try like this
LOAD
Month,
Year,
Date(MakeDate(Year, Month), 'YYYY-MM') AS MonthYear
FROM DataSource;
Hope this helps you.
Regards,
Jagan.
Hi,
Try this
Temp_Data:
LOAD * INLINE [
Month, Year
3, 2015
4, 2015
5, 2015
6, 2015
7, 2015
];
Final:
LOAD
*,
Date(MakeDate(Year, Month),'YYYY-MM') AS [Yr Mnth]
Resident Temp_Data
Order By Year, Month DESC
;
DROP Table Temp_Data;
Hi,
if you don't want to change your script, you could use a calculated list box with the already proposed expressions.
Some solutions could be:
hope this helps
regards
Marco