ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I add 12 business hours to the current date/time? (https://www.excelbanter.com/excel-worksheet-functions/87773-how-do-i-add-12-business-hours-current-date-time.html)

[email protected]

How do I add 12 business hours to the current date/time?
 
Business hours is defined as Monday to Friday, 8:00am - 4:30pm.

I want to add 12 business hours to the current time (09/05/2006 9:13pm)
and return the due date for completion (11/05/2006 11:30am).

Anyone help me?


tony h

How do I add 12 business hours to the current date/time?
 

in vba or on the worksheet?

It is 01:15 here and I need my sleep but a few pointers:
a date and time is a floating point number. The integer part is the
number of days from 1-jan-1900 and the fractional part is a fraction of
one day so 2.5 is 3jan1900 12:00

to add 12 hours add 0.5 to add 2 days add 2

08:00 is 8/24 and 16:30 is 16.5/24

If you want it on the worksheet I would probably use a user defined
function so that I could write the code in VBA

regards.

Wrote:
Business hours is defined as Monday to Friday, 8:00am - 4:30pm.

I want to add 12 business hours to the current time (09/05/2006
9:13pm)
and return the due date for completion (11/05/2006 11:30am).

Anyone help me?



--
tony h
------------------------------------------------------------------------
tony h's Profile:
http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=540499



All times are GMT +1. The time now is 01:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com