7 Replies Latest reply: Dec 13, 2017 1:37 PM by Sunny Talwar

# Be sure that we're in working day..

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 !

• ###### Re: Be sure that we're in working day..

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)

• ###### Re: Be sure that we're in working day..

That obviously worked Thanks sun !

• ###### Re: Be sure that we're in working day..

Sun,

What baout Last Year?

=FirstWorkDate(Date(Date(Today()-1) - Round(YearEnd(Today(1))- YearStart(Today(1)))), 1)

?

• ###### Re: Be sure that we're in working day..

Seems like it, right?

• ###### Re: Be sure that we're in working day..

Although, this might be eased down to this

Year

Month

• ###### Re: Be sure that we're in working day..

Maybe something like this:

date( date(Today()-1)-networkdays(MonthStart(Today()-30)), date(Today()-1))

Hope it helps,

Andrés

• ###### Re: Be sure that we're in working day..

Every contribution is to salute Andrès !

Thanks !