Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
how i vil get year,month by using subfield function
i wil get ans lik 2015-06 0r 2015-jun
can any one help on this
Suresh
Hi,
You can also get it by using left() and right().
tanq all.
Suresh Chanty
Table1:
LOAD
if (len(Subfield(Date,'-',2))>2,Month(Date#(Date, 'YYYY-MMM')),Month(Date#(Date, 'YYYY-MM'))) as Month,
if (len(Subfield(Date,'-',2))>2,Year(Date#(Date, 'YYYY-MMM')),Year(Date#(Date, 'YYYY-MM'))) as Year
Inline
[
Date
2002-01
2003-Apr
2014-02
2015-Jun
];
Hi sureshqv ,
Please close the thread by selecting Correct Answer.
left( [fieldName], 4) as Year
right( [fieldName],2) as Month