+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : sort by time in date/time field

  1. #1
    Registered User
    Join Date
    05-03-2012
    Location
    NJ
    MS-Off Ver
    Excel 2003
    Posts
    4

    sort by time in date/time field

    Hi,
    I have an excel column with date/time as

    time(as hour)
    2011-08-19 00:00:00
    2011-08-19 01:00:00
    2011-08-19 02:00:00
    2011-08-20 00:00:00
    2011-08-20 01:00:00
    2011-08-20 02:00:00
    can this be sorted based on time without separating the time into a separate column?
    so the result is

    2011-08-19 00:00:00
    2011-08-20 00:00:00
    2011-08-19 01:00:00
    2011-08-20 01:00:00
    2011-08-19 02:00:00
    2011-08-20 02:00:00

    Thanks for any help!
    bha

  2. #2
    Forum Contributor SCLai's Avatar
    Join Date
    08-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: sort by time in date/time field

    Try this...?

    TimeSorting.PNG

    =N(CELL) converts your DateTime into a value
    =MOD(N(CELL),1) will remove the whole-number portion of the DateTime, leaving you with the Time Portion

    After that, sort using filter (Alt+ D+F+F)

    So in conclusion...
    1.) If your DateTime is in A2, key this into B2: =MOD(N(A2),1)
    2.) Sort using Filter

    I think some of the other may be able to, but I won't be able to sort it without an additional column.
    Well, hope this helps to a certain degree!
    Last edited by SCLai; 05-04-2012 at 04:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1