Jump to content

How to calculate the entries within the last 40 business days?


TheBrandon

Recommended Posts

Hello all,

 

I have a typical registration system where users can create accounts and the current time is stored in a TIMESTAMP field.

 

I need to calculate how many people joined with the last 40 business days.

 

What is the best way to achieve this? I found a few functions on php.net for calculating business days but all of the ones I found seem to deal primarily with the future, not the past.

 

I really just need the single date. If I could just get a function that would return a 2012-05-24 21:11:49 type timestamp for the date 40 business days ago, I think I could take it from there, I'm just not sure what the most efficient way to calculate this is.

 

Any ideas?

Excluding holidays, 40 business days = 8 whole weeks. It's a rather convenient number. So no special logic required.

 

Wow, I didn't realize that lol. Thank you very much. Sometimes I guess you just need another mind looking at the problem!

 

Have a great day, thanks again!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.