 ShowAll Questionssorted byDate Posted Wayne_Clark

# Formula to Calculate weekdays between a Date and the End of the Year

Is there a formula out there that will display the last day of the current year? (12/31/2011)

I'm trying to calculate the number of weekd days there are between a date and the end of the year.

I've found the formula that will automatically calculate the amount of business days there are between a start and end date, so if I could reference the end date as the formala field that displays the last day of the year, I would meet my requirement.

Thanks! Best Answer chosen by Admin (Salesforce Developers)  Pat Patterson

DATE( YEAR( TODAY() ), 12, 31 ) should give you the last day of the current year. Note that this will update each year, so you might want to use a field in place of TODAY() or your numbers will change! Pat Patterson

DATE( YEAR( TODAY() ), 12, 31 ) should give you the last day of the current year. Note that this will update each year, so you might want to use a field in place of TODAY() or your numbers will change!

This was selected as the best answer WillN

Not entirely clear which problem you're tryng ot solve - are you looking for what day of the week?  If so, this post might help:

https://sites.secure.force.com/success/ideaView?c=09a30000000D9xoAAC&id=087300000006tamAAA

it gives a formula that can be used to determine the day of the week based on a known date/day of week.

Otherwise, wouldn't the last day of the year always be 12/31?  Or is it that the year is going to be the variable?  If so, this formula will give you a date for the current year:

Date(Year(DateValue(Now())),12,31)

You could substitute a datetime mergive field instead of the Now() function.

Hope this helps Mr. W

Wayne,

You mentioned you found the formula that calculates Business Days between Start and End dates.  Could you link me to that formula or share it?

I've been looking high and low for a straight forward formula that does that!

Thanks!