time within business hours?

AceFI

Board Regular
Joined
Apr 20, 2012
Messages
91
hi team,
for the life of me i can't seem to work out a true or false for between work hours.. i've googled and seen responses, however cant seem to make it work.

My sheet is converting epoch time to 24h time;

epoch; 1662370201918
converted; =epoch/86400000+DATE(1970,1,1)
returning = 05/09/22 09:30:02

I'm wanting a true if the time is between 8:00 and 18:00

thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Like this ?
Excel Formula:
=IF(AND(MOD(A20/86400000+DATE(1970,1,1),1)>8/24,MOD(A20/86400000+DATE(1970,1,1),1)<18/24),TRUE,FALSE)
(A20 holds epoch)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Depending on your version, another option
Fluff.xlsm
AB
1
21662370201918TRUE
Main
Cell Formulas
RangeFormula
B2B2=LET(a,MOD(A2/86400000+DATE(1970,1,1),1),MEDIAN(a,TIME(8,0,0),TIME(18,0,0))=a)
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,239
Members
448,879
Latest member
VanGirl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top