7 Replies Latest reply: Jan 3, 2014 11:35 PM by vishal waghole

Last day of previous year

Hello

I wonder how can i get the last day of previous year

• Re: Last day of previous year

YearEnd(today(),-1)

• Re: Last day of previous year

Ioannis

Do beware though that YearEnd(today(),-1) will return a timestamp with the time after the date of 23:59:59

If you just want the pure date then floor & date it.

=date(floor((yearend(Today(), -1))))

Best Regards,     Bill

• Re: Last day of previous year

ok ,

and if i have to make an expression with this → Sum(INIT_QTY) how i do it all together ?

Im sorry but im very new in all this

• Re: Last day of previous year

Ioannis

I am not sure what you mean by that addition to your original question, could you clarify.

Best Regards,     Bill

• Re: Last day of previous year

Im sorry Bill

I mean that i have to make an expression like following :

Sum(INIT_QTY) .

But i must  get the Sum of the last day of previous year

• Re: Last day of previous year

hi try this

sum({<Year={'\$(=Max(Year)-1)'},Month={'\$(=Maxstring(Month))'},Date={'\$(=max(Date))'}>}INIT_QTY)

or

sum({<Date={'\$(=makedate('\$(=max(Year)-1)','\$(=max(Monthnum))',''\$(=max(Day))')'}>}INIT_QTY)

• Re: Last day of previous year

Hi Loannis,