Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys ( stalwar1 )
Afer a loong day, I really can't think anymore
so, I really need ur help; the question is rather simple:
if I select a date; I want to go back one Month.
the expression I'm using is:
date( date(Today()-1)- round( MonthEnd(Today()-30)- MonthStart(Today()-30)))
But, with that, going back from 12/12/2017 using this: I got 12/11/2017 which is a sunday.. How can I go back to the closest WORKING DATE (monday or friday) ?
Thanks !
To go back to Nov 10th
=FirstWorkDate(Date(Date(Today()-1) - Round(MonthEnd(Today()-30)- MonthStart(Today()-30))), 1)
To go forward to Nov 13th
=LastWorkDate(Date(Date(Today()-1) - Round(MonthEnd(Today()-30)- MonthStart(Today()-30))), 1)
To go back to Nov 10th
=FirstWorkDate(Date(Date(Today()-1) - Round(MonthEnd(Today()-30)- MonthStart(Today()-30))), 1)
To go forward to Nov 13th
=LastWorkDate(Date(Date(Today()-1) - Round(MonthEnd(Today()-30)- MonthStart(Today()-30))), 1)
That obviously worked Thanks sun !
Maybe something like this:
date( date(Today()-1)-networkdays(MonthStart(Today()-30)), date(Today()-1))
Hope it helps,
Andrés
Every contribution is to salute Andrès !
Thanks !
Sun,
What baout Last Year?
=FirstWorkDate(Date(Date(Today()-1) - Round(YearEnd(Today(1))- YearStart(Today(1)))), 1)
?
Seems like it, right?
Although, this might be eased down to this
Year
=FirstWorkDate(AddYears(Today()-1, -1), 1)
Month
=FirstWorkDate(AddMonths(Today()-1, -1), 1)