3 Replies Latest reply on Jan 12, 2016 5:43 PM by Mike Duncan

# Calculate Days Left In Month

I need to make a field that calculates days left in a month. Business days would be Mon-Sat . Sunday has to be excluded.

• ###### 1. Re: Calculate Days Left In Month

The Calc would simply just look at the current date and calculate it from there. I appreciate the help.

• ###### 2. Re: Calculate Days Left In Month

Date ( Month ( Get ( CurrentDate ) ) + 1 ; 0 ; Year ( Get ( CurrentDate ) ) )  - Get ( CurrentDate )

• ###### 3. Re: Calculate Days Left In Month

Hi ZoocMan85,

Just getting the number of days left is easy enough, but to leave out the remaining Sundays, you can calculate with a Let statement like so:

Let ( [

this.date = Resources::ThisDate ;

this.nextmonth = Date ( Month ( this.date ) + 1 ; "1" ; Year ( this.date ) ) ;

this.remaining = this.nextmonth - this.date ;

this.daynum = DayOfWeek ( this.date ) ;

this.suns = Ceiling ( this.remaining / 7 ) ;

this.nosuns = this.remaining - this.suns ;

end = 0

];

"Total Remaining = " & this.remaining & "¶" &

"Total Work Remaining = " & this.nosuns

)

Would that work?

Thanks

Mike