I figured I must have misread your original post, so I copied the freelancer dashboard template, modified it, and posted my modification — and then re-read your most recent reply and realized I *hadn’t* misunderstood you. Here’s the solution you want; I’ll post the other approach (that is, the one that automates the days-left-in-month calculation) after.

This is the formula from my reply to an earlier message on the forum.

`DATETIME_DIFF({Date to},{Date from},'days')-`

`(INT(DATETIME_DIFF({Date to},{Date from},'days')/7)+`

`IF(DATETIME_FORMAT({Date from},'E')>DATETIME_FORMAT({Date to},'E'),1,0))*2`

To count the number of work days between today and the next invoice date, replace `{Date to}`

with `{Next invoice}`

and `{Date from}`

with `TODAY()`

, as so:

`DATETIME_DIFF({Next invoice},TODAY(),'days')-`

`(INT(DATETIME_DIFF({Next invoice},TODAY(),'days')/7)+`

`IF(DATETIME_FORMAT(TODAY(),'E')>DATETIME_FORMAT({Next invoice},'E'),1,0))*2`

This doesn’t support the ‘anticipated days off’ functionality of the original formula, but it should give you the number of workdays until the next invoice date.

**NOTE:** My original formula assumed both beginning and ending dates always fell on a workday; I’ve not tested to see what happens when `TODAY()`

is on a weekend.

What follows is the first version of my reply, with the days-left-in-month calculation.

. ____________________________________________________________

I tracked down the template you used, and I *think* this does what you want. I’m not entirely sure, though, as 15 minutes ago this became the worst day of the month to test this algorithm.

I’ve also not attempted to plug this into the existing dashboard. Also, the original formula includes a cheat to allow for planned days off to be subtracted from the ‘days left’ calculation; if you need that functionality, you’ll have to add it to the formula.

I’ve created a demo ‘base’ that contains only the three fields (two new, one modified) you will need to add this modification to your existing dashboard. (To keep things cleaner and more easily maintained, I perform the `{Days Left}`

calculation in three separate pieces, a field for each. You can combine them into a single formula, if you wish.)

Briefly, I’ve created two new fields and replaced the formula for the existing `{Days Left}`

field.

`{Month}`

formula field

Formula:

`MONTH(TODAY())`

`{EndOfMonth}`

formula field

Formula:

`DATETIME_PARSE(DATETIME_FORMAT(TODAY(),'MM')&'/'&`

`IF(Month=1,'31',IF(Month=2,'28',IF(Month=3,'31',IF(Month=4,'30',`

`IF(Month=5,'31',IF(Month=6,'30',IF(Month=7,'31',IF(Month=8,'31',`

`IF(Month=9,'30',IF(Month=10,'31',IF(Month=11,'30',IF(Month=12,'31')`

`)))))))))))&'/'&DATETIME_FORMAT(TODAY(),'YYYY'),'MM/DD/YYYY')`

`{Days Left}`

formula field

Replace formula with:

`DATETIME_DIFF(EndOfMonth,TODAY(),'days')-`

`(INT(DATETIME_DIFF(EndOfMonth,TODAY(),'days')/7)+`

`IF(DATETIME_FORMAT(TODAY(),'E')>DATETIME_FORMAT(EndOfMonth,'E'),1,0))*2`

Again, you’ll probably want to see how this code works tomorrow.