truncate date not time

buckwheat

New Member
Joined
Feb 20, 2003
Messages
21
I have a cell that lists the date and time. I need to just pull out the time and discard the date. Any ideas?
 
You can convert a time in decimals to a true time in excel by dividing by 24 so you could do something like this
Book1
ABCD
1scheduledactuallate
26.8311/03/2005 07:0000:10:00
3
4
Sheet2


Formula in C2

=MOD(B2,1)-A2/24


There are a few things you may want to bear in mind

If you want to show the lateness in minutes not time format then use

=MOD(B2,1)*1440-A2*60 instead

E.g. given your example this would just give you 10

This has the advantage of allowing you to display a negative figure (if arrival is early) which the first formula won't

...also note that 6.83 isn't exactly 06:50 so you won't get exactly 10 minutes as a result unless the underlying value is actually 6.833333 etc.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Thanks Barry, I just tried this and it worked perfectly. I should have figured this one out myself. The Excel help information is not very good btw.
Christina
 
Upvote 0

Forum statistics

Threads
1,214,548
Messages
6,120,141
Members
448,948
Latest member
spamiki

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