Hi all !

I am trying to find a way to display the previous business date.

Currently I have this :

Clip.setpaste(formatdate("MM",date)++"/"++formatdate("dd",date)
++"/"++formatdate("yyyy",date))

which shows the date in the format MM/dd/YY.

If I use .....formatdate("dd",date-1.....

I would get the last day, however the problem is that this is not 
considering that going back from the 1st of a month the previous
date would have to be the 30th/31st (Jan,Mar-Dec) and 28th/29th for 
February.

For instance if I run this command on Feb 01 the output should be Jan 
31, but it is in fact Jan 30.

I basically need a "smart" date calculation which incorporates how 
many days the previous months has and actually showing that month.

Perfect would also be to take into consideration that when running 
this command on a Monday, the previous business day would be a Friday.

I looked into the date plugin but couldn't find a proper way to do 
what I am looking for.

Any idea how I can get this set up ?    Any help is much appreciated.

Cheers




Reply via email to