Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have year field contains 2014,2015,2016,2017 from which i want to create date,month and monthname. how can I do it.
give any suggestion.
Try this from any year field create first date and then yearstart dates and year ends based on the dates then create year,month,monthname etc fields.
TempTab:
LOAD *,MakeDate(Year) as TempDate;
LOAD * Inline
[
Year
2014
2015
2016
2017
];
Dates:
LOAD YearStart(TempDate) as MinDate,YearEnd(TempDate) as MaxDate Resident
TempTab;
LET vMinDate =Floor(Peek('MinDate',0,'Dates'));
LET vMaxDate =Floor(Peek('MaxDate',-1,'Dates'));
LOAD
Date($(vMinDate) + IterNo() -1) as DateField,
Year($(vMinDate) + IterNo() -1) as Year,
Month($(vMinDate) + IterNo() -1) as Month,
MonthName($(vMinDate) + IterNo() -1) as MonthName
AutoGenerate 1
While ($(vMinDate) + IterNo() -1) <= NUM($(vMaxDate));
can you describe your expected result?