+ Reply to Thread
Results 1 to 4 of 4

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

  1. #1
    Ron
    Guest

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

    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 ?

  2. #2
    Gary''s Student
    Guest

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

    if the date-time is in A1, then:
    =MOD(A1,1) will return the time part
    --
    Gary's Student


    "Ron" wrote:

    > 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 ?


  3. #3
    Niek Otten
    Guest

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

    =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

    "Ron" <[email protected]> wrote in message news:[email protected]...
    | 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 ?



  4. #4
    Dave Peterson
    Guest

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

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

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

    (Format as time)


    Ron wrote:
    >
    > 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 ?


    --

    Dave Peterson

+ 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