Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear friends,
how can convert the date 006.2010 in 30/06/2010??
in the table there is the period 006.2010 and I want convert in script to date 30/06/2010 and then manage this one in master calendar
can you help me
regards
gennaro
I done in this way:
Directory; CO_PA: LOAD
MonthEnd(makedate((right(Periodo, 4)), (left(Periodo, 3)))) as Data,
//Calendar
LET varMinDate = Num(Peek('MinDate'));
LET varMaxDate = Num(Peek('MaxDate'));
LET vToday = num(today());
DROP TABLE MaxMinDate;
//*************** Temporary Calendar ***************
TempCalendar:
LOAD
$(varMinDate) + rowno() - 1 AS Num,
date($(varMinDate) + rowno() - 1) AS TempDate
AUTOGENERATE $(varMaxDate) - $(varMinDate) + 1;
//*************** Master Calendar ***************
MasterCalendar:
LOAD
TempDate AS Data,
Year(TempDate)as Anno,
Month(TempDate) as Mese,
Week(TempDate) as Settimana,
'Q' & Ceil(Month(TempDate)/3) as Quarter
but there's this error:
Can you explain a bit more how the period maps to the date? Is the period "006" month 6 and you want the monthend as date? Do you have 12 periods 1-12?
-Rob
Hi Rob,
yes, all rigth
'006' is month 6 (june)
I want monthend 30/06/2010 and I have 12 period
thanks in advance
Hi, is that what you mean?
=MonthEnd( Date( Date#( '006.2010', '0MM.YYYY' ) ) )