+ Reply to Thread
Results 1 to 4 of 4

Question on sorting dates

  1. #1
    Excel heavy user
    Guest

    Question on sorting dates

    After I download data from a database, the data in the date column is in date
    format, as for example, "11/02/2004". To make sure they are in date format, I
    format them again. Then I tried to sort the date in an ascending order, it
    doesn't work. It did some sorting work, but it put November dates right after
    January dates, and then Feb, Mar.... I guess Excel doesn't really take this
    column of data as dates.

    Any help is appreciated.

    Jason

  2. #2
    Peo Sjoblom
    Guest

    RE: Question on sorting dates

    What happens if you test with a formula

    =ISTEXT(A2)

    if it returns TRUE the dates are text, if so, copy an empty cell, select the
    dates
    and do edit>paste special and select add, then reformat the dates as mm/dd/yyy
    or dd/mm/yyyy depending on whether dates are US or UK format
    If that does nolt help you probably have trailing or leading spaces as well,
    then you can first do an edit>replace and replace a space with nothing

    Regards,

    Peo Sjoblom

    "Excel heavy user" wrote:

    > After I download data from a database, the data in the date column is in date
    > format, as for example, "11/02/2004". To make sure they are in date format, I
    > format them again. Then I tried to sort the date in an ascending order, it
    > doesn't work. It did some sorting work, but it put November dates right after
    > January dates, and then Feb, Mar.... I guess Excel doesn't really take this
    > column of data as dates.
    >
    > Any help is appreciated.
    >
    > Jason


  3. #3
    Excel heavy user
    Guest

    RE: Question on sorting dates

    Thanks a lot.

    Jason

    "Peo Sjoblom" wrote:

    > What happens if you test with a formula
    >
    > =ISTEXT(A2)
    >
    > if it returns TRUE the dates are text, if so, copy an empty cell, select the
    > dates
    > and do edit>paste special and select add, then reformat the dates as mm/dd/yyy
    > or dd/mm/yyyy depending on whether dates are US or UK format
    > If that does nolt help you probably have trailing or leading spaces as well,
    > then you can first do an edit>replace and replace a space with nothing
    >
    > Regards,
    >
    > Peo Sjoblom
    >
    > "Excel heavy user" wrote:
    >
    > > After I download data from a database, the data in the date column is in date
    > > format, as for example, "11/02/2004". To make sure they are in date format, I
    > > format them again. Then I tried to sort the date in an ascending order, it
    > > doesn't work. It did some sorting work, but it put November dates right after
    > > January dates, and then Feb, Mar.... I guess Excel doesn't really take this
    > > column of data as dates.
    > >
    > > Any help is appreciated.
    > >
    > > Jason


  4. #4
    Greg
    Guest

    Question on sorting dates


    >-----Original Message-----
    >After I download data from a database, the data in the

    date column is in date
    >format, as for example, "11/02/2004". To make sure they

    are in date format, I
    >format them again. Then I tried to sort the date in an

    ascending order, it
    >doesn't work. It did some sorting work, but it put

    November dates right after
    >January dates, and then Feb, Mar.... I guess Excel

    doesn't really take this
    >column of data as dates.
    >
    >Any help is appreciated.
    >
    >Jason
    >.

    When formatting your cells in Excel, try the GENERAL
    format selection and see if that helps. Mine sorts
    correctly when set that way and using your example. Greg

+ 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