Pulling just the hh:mm from a cell with mm/dd hh:mm

calvin771

Board Regular
Joined
Jul 31, 2007
Messages
55
I am trying to pull just the date out of a field for comparison's sake.

I am capturing the time of an event using the NOW() function. This is driven by a drop-down menu that populates a start time and finish time field. It gives me the timestamp in mm/dd hh:mm format. I need to pull just the time out of that information.

For example, the trouble I'm having is this:

8:46 AM = 0.3656

8/4/09 8:46 AM = 40028.3656

I need the 0.3656 to compare in a nested IF statement. The 40028 portion is causing me difficulties.

I understand that the 40028 is the number of complete days since Excel starts counting time, but I can not think of a clean way to pull that information out.

Ultimately, I have a nested IF statement that will select which group a project was started and finished by depending on the time of day. I just need help stripping the date from the original timestamp and leaving a number that can be used in a nested IF statement.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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