Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends,
Date(MonthName(Period-14,+1),'YYYYMM') as [Trans Period]
I am not able understand the above line, could you please explain me, what is it mean of -14.
Regards
Chriss
Period seems to be a date field. Period-14 is then 14 days earlier than the value of Period (i.e. two weeks earlier). Monthname returns the first day of the month of the date, in this case of Period-14. The second parameter 1 is an offset, so it doesn't return the month of Period-14, but a month later. Then this date is formatted using the Date function so it displays in YYYYMM format (e.g. 201204).
Hello Gysbert,
thanks a lot for your explnation.