How can you strip the time of day out of a date field

G

Guest

I'm trying to sort by the time of day. Because the date and time field are
part of the same number the worksheet sorts by date then time.
Any suggestions ?
 
N

Niek Otten

=MOD(A1,1), fill down as far as needed.
Select the column, Copy, Paste Special, check Values.
Now you can sort on that column

--
Kind regards,

Niek Otten

| I'm trying to sort by the time of day. Because the date and time field are
| part of the same number the worksheet sorts by date then time.
| Any suggestions ?
 
D

Dave Peterson

If you really have date and time in a cell (say A1):

=a1-int(a1)
or
=mod(a1,1)

(Format as time)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top